From df67033b839dc0765ecbee66217f077b4d0c986c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 12 Nov 2017 21:37:48 -0500 Subject: math: quaternion: Stop referncing inline procedure before it's defined. * chickadee/math/quaternion.scm (with-new-quaternion): Build quaternion manually instead of using make-null-quaternion. --- chickadee/math/quaternion.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chickadee/math/quaternion.scm b/chickadee/math/quaternion.scm index 893ccd7..4df4ffd 100644 --- a/chickadee/math/quaternion.scm +++ b/chickadee/math/quaternion.scm @@ -54,7 +54,8 @@ (f32vector-set! (unwrap-quaternion q) i x)) (define-syntax-rule (with-new-quaternion name body ...) - (let ((name (make-null-quaternion))) body ... name)) + (let ((name (wrap-quaternion (f32vector 0.0 0.0 0.0 0.0) #f))) + body ... name)) (define-inlinable (quaternion x y z w) "Return a new quaternion with values X, Y, Z, and W." -- cgit v1.2.3