From 8b24b2ffbd413811026a91ed7b23ffb9de7e45da Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 18 Nov 2020 17:22:03 -0500 Subject: math: quaternion: Remove calls to deleted square procedure. Oops. --- chickadee/math/quaternion.scm | 10 +++++----- 1 file 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))))) -- cgit v1.2.3