summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-02-16 20:37:24 -0500
committerDavid Thompson <dthompson2@worcester.edu>2023-06-08 08:14:41 -0400
commitf1862546c55f363d0ca1eb874e5ce1f1a5e092aa (patch)
tree00e185d4345f7f09af06aec46e8e08c755c67b26
parent5fb3ce614b59f4bd8d7966d41aab750d317810aa (diff)
Handle infinite float value.
-rw-r--r--chickadee/graphics/seagull.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chickadee/graphics/seagull.scm b/chickadee/graphics/seagull.scm
index 44a9bd9..58fe04b 100644
--- a/chickadee/graphics/seagull.scm
+++ b/chickadee/graphics/seagull.scm
@@ -2397,7 +2397,8 @@
(define (emit:float n stage version port level)
(define temp (unique-identifier))
(indent level port)
- (format port "float ~a = ~a;\n" temp n)
+ (format port "float ~a = ~a;\n" temp
+ (if (inf? n) "1.0 / 0.0" n))
(list temp))
(define (emit:boolean b stage version port level)