game.loop: last-tick-percent-offset counts down to zero, need to subtract from 1.

master
John Benediktsson 2020-01-06 13:20:12 -08:00
parent c77cc4c205
commit b2dc630bd0
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ TUPLE: game-loop-error-state error game-loop ;
: last-tick-percent-offset ( loop -- float ) : last-tick-percent-offset ( loop -- float )
[ draw-timer>> next-nanos>> nano-count - ] [ draw-timer>> next-nanos>> nano-count - ]
[ tick-interval-nanos>> ] bi /f 0.0 1.0 clamp ; [ tick-interval-nanos>> ] bi /f 1.0 swap -
0.0 1.0 clamp ;
GENERIC#: record-benchmarking 1 ( loop quot -- ) GENERIC#: record-benchmarking 1 ( loop quot -- )