Advertisement
Guest User

dubLord

a guest
Aug 24th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. //~~~~~ INCLUSIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
  2. #include<stdio.h>
  3. #include<stdlib.h>
  4. #include<math.h>
  5. #include<time.h>
  6. #include<SDL2/SDL.h>
  7. //definitions
  8. #define PI 3.14159265358979323846
  9. #define INT_MAX 2147483647
  10. #define GRAV 9.81
  11. //local inclusions
  12. #include"colorDefs.h"
  13. #include"structurals.h"
  14. #include"perspective.h"
  15. //SDL pointers
  16. SDL_Window *gWindow = NULL;
  17. SDL_Surface *gScreenSurface = NULL;
  18. SDL_Surface *gPicture = NULL;
  19. SDL_Renderer *gRenderer = NULL;
  20. //Struct tree
  21. const int N_bit = 17;
  22. //~~~~~ MAIN PROGRAM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
  23. // gettin' silly-willy...
  24. //```````````````````````````````````````````````````````````````````````````````````
  25. int main() {
  26. //random seed
  27. randSeed();
  28. //run R5
  29. int tNum = 17;
  30. int z;
  31. int DUB[tNum];
  32. int TRP[tNum];
  33. printf("Dub\tTrp\tR5\t\tCR5\n");
  34. for (z = 0; z < tNum; z++) {
  35. int k;
  36. dUb(&k);
  37. DUB[z] = k;
  38. tRp(&k);
  39. TRP[z] = k;
  40. double R5;
  41. R5 = 0.6*DUB[z] + 0.4*TRP[z];
  42. double CR5;
  43. CR5 = (R5 - 1.0)/1.4;
  44. printf("%d\t%d\t%f\t%f\n",DUB[z],TRP[z],R5,CR5);
  45. }
  46. return 0;
  47. }
  48. //~~~~~ FUNCTIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
  49. #include"statDefs.h" //statisticl algorithms
  50. #include"arrayDefs.h" //array methods
  51. #include"determinant.h" //classic determinant
  52. #include"linearAlgebra.h" //linear algebraic methods
  53. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~ ~ ~
  54. // ^^^ ABOVE IS OFTEN A FORM OF SOCIO-ECONOMIC FLAK PROVIDED BY WHATEVER BROS ^^^
  55. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
  56. //~~~~~ cBit functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
  57. void dUb(int *kIn) {
  58. double RAND = pRand();
  59. if(RAND < 0.5) {*kIn = 1;}
  60. else {*kIn = 2;}
  61. }
  62. void tRp(int *kIn) {
  63. double RAND = pRand();
  64. if(RAND < 0.25) {*kIn = 1;}
  65. else if (RAND < 0.5) {*kIn = 2;}
  66. else if (RAND < .75) {*kIn = 3;}
  67. else {tRp(kIn);}
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement