diff options
| author | ilotterytea <iltsu@alright.party> | 2024-12-10 19:54:30 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-12-10 19:54:30 +0500 |
| commit | 4ad320a53a4b030d2fe7b923024e78a0217a3b82 (patch) | |
| tree | a549a4435d039d4a7071d7aa90ea9fddd3de23b4 | |
| parent | c664ddaf47e078219b848b9e2d9c3c4241420261 (diff) | |
fix: positions werent random
| -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; |
