diff options
| author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-01-09 22:02:38 +0100 |
|---|---|---|
| committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-01-09 22:02:38 +0100 |
| commit | 0d0f738b3adc40de827ada9083404e9f9e065e2b (patch) | |
| tree | 77d5dd3fe6f634cff26a8991d56907eb0aec213b /stage3 | |
| parent | 31a19a1f6b02fe5638c877868be1ff26b5e44abe (diff) | |
| download | cuddles-0d0f738b3adc40de827ada9083404e9f9e065e2b.tar.xz | |
make cheese spin faster
Diffstat (limited to 'stage3')
| -rw-r--r-- | stage3/cheese_demo.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/stage3/cheese_demo.c b/stage3/cheese_demo.c index efbd728..cb0b5ed 100644 --- a/stage3/cheese_demo.c +++ b/stage3/cheese_demo.c @@ -140,14 +140,15 @@ void cheese_demo() cheese ch = make_cheese_model(8, rad(60), 500, 375); float angle = 0; - u64 time = clock_monotonic(); + u64 last_frame = clock_monotonic(); for (;;) { - u64 time1 = clock_monotonic(); - float delta = (time1 - time) / (float)(NANOSECONDS); - time = time1; + u64 now = clock_monotonic(); - angle += delta * 90; + float delta = (now - last_frame) / (float)(NANOSECONDS); + last_frame = now; + + angle += delta * 120; float transform[4][4]; float tmp[4][4]; |
