fix infinite fps error
This commit is contained in:
parent
8083fdd812
commit
a6fc7d944f
8
word.rkt
8
word.rkt
|
@ -3,6 +3,7 @@
|
|||
racket/match
|
||||
racket/contract/base
|
||||
racket/flonum
|
||||
math/flonum
|
||||
racket/format
|
||||
racket/generic
|
||||
lux/chaos)
|
||||
|
@ -28,6 +29,7 @@
|
|||
(define (word-return w) w)])
|
||||
|
||||
(define (lux-standard-label l frame-time)
|
||||
(define fps (fl/ 1000.0 frame-time))
|
||||
(~a l
|
||||
": "
|
||||
"Frame time: "
|
||||
|
@ -36,9 +38,11 @@
|
|||
#:precision 1)
|
||||
"ms; "
|
||||
"FPS: "
|
||||
(~r (fl/ 1000.0 frame-time)
|
||||
(if (flinfinite? fps)
|
||||
"inf"
|
||||
(~r fps
|
||||
#:min-width 10
|
||||
#:precision 2)))
|
||||
#:precision 2))))
|
||||
|
||||
(define current-chaos (make-parameter #f))
|
||||
|
||||
|
|
Loading…
Reference in New Issue