Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //~~~~~ INCLUSIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
- #include<stdio.h>
- #include<stdlib.h>
- #include<math.h>
- #include<time.h>
- #include<SDL2/SDL.h>
- //definitions
- #define PI 3.14159265358979323846
- #define INT_MAX 2147483647
- #define GRAV 9.81
- //local inclusions
- #include"colorDefs.h"
- #include"structurals.h"
- #include"perspective.h"
- //SDL pointers
- SDL_Window *gWindow = NULL;
- SDL_Surface *gScreenSurface = NULL;
- SDL_Surface *gPicture = NULL;
- SDL_Renderer *gRenderer = NULL;
- //Struct tree
- const int N_bit = 17;
- //~~~~~ MAIN PROGRAM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
- // gettin' silly-willy...
- //```````````````````````````````````````````````````````````````````````````````````
- int main() {
- //random seed
- randSeed();
- //run R5
- int tNum = 17;
- int z;
- int DUB[tNum];
- int TRP[tNum];
- printf("Dub\tTrp\tR5\t\tCR5\n");
- for (z = 0; z < tNum; z++) {
- int k;
- dUb(&k);
- DUB[z] = k;
- tRp(&k);
- TRP[z] = k;
- double R5;
- R5 = 0.6*DUB[z] + 0.4*TRP[z];
- double CR5;
- CR5 = (R5 - 1.0)/1.4;
- printf("%d\t%d\t%f\t%f\n",DUB[z],TRP[z],R5,CR5);
- }
- return 0;
- }
- //~~~~~ FUNCTIONS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
- #include"statDefs.h" //statisticl algorithms
- #include"arrayDefs.h" //array methods
- #include"determinant.h" //classic determinant
- #include"linearAlgebra.h" //linear algebraic methods
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~ ~ ~
- // ^^^ ABOVE IS OFTEN A FORM OF SOCIO-ECONOMIC FLAK PROVIDED BY WHATEVER BROS ^^^
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
- //~~~~~ cBit functions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`',
- void dUb(int *kIn) {
- double RAND = pRand();
- if(RAND < 0.5) {*kIn = 1;}
- else {*kIn = 2;}
- }
- void tRp(int *kIn) {
- double RAND = pRand();
- if(RAND < 0.25) {*kIn = 1;}
- else if (RAND < 0.5) {*kIn = 2;}
- else if (RAND < .75) {*kIn = 3;}
- else {tRp(kIn);}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement