summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-11-18 17:22:03 -0500
committerDavid Thompson <dthompson2@worcester.edu>2020-11-18 17:22:03 -0500
commit8b24b2ffbd413811026a91ed7b23ffb9de7e45da (patch)
tree6d53f6b0fb67ae1eb1b4df0926233cf9da60774e
parent9a5ef19d5971488de18539eaf68e35bf590a4c5e (diff)
math: quaternion: Remove calls to deleted square procedure.
Oops.
-rw-r--r--chickadee/math/quaternion.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/chickadee/math/quaternion.scm b/chickadee/math/quaternion.scm
index cf2b4bc..1a5ce68 100644
--- a/chickadee/math/quaternion.scm
+++ b/chickadee/math/quaternion.scm
@@ -101,8 +101,8 @@
(define-inlinable (quaternion-magnitude q)
"Return the magnitude of the quaternion Q."
- (sqrt
- (+ (square (quaternion-w q))
- (square (quaternion-x q))
- (square (quaternion-y q))
- (square (quaternion-z q)))))
+ (let ((w (quaternion-w q))
+ (x (quaternion-x q))
+ (y (quaternion-y q))
+ (z (quaternion-z q)))
+ (sqrt (+ (* w w) (* x x) (* y y) (* z z)))))