diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 4 | ||||
| -rw-r--r-- | src/star.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -1,8 +1,12 @@ #include "constants.h" #include "raylib.h" #include "star.h" +#include "stdlib.h" +#include "time.h" int main(int argc, char *argv[]) { + srand(time(0)); + InitWindow(800, 600, "hyperspace (demo)"); SetTargetFPS(60); @@ -2,13 +2,11 @@ #include <math.h> #include <stdlib.h> -#include <time.h> #include "constants.h" #include "raylib.h" Vector3 Generate3DPosition() { - srand(time(0)); double random = (double)rand() / RAND_MAX; double angle = random * 2.0 * M_PI; |
