summaryrefslogtreecommitdiff
path: root/chickadee/math/vector.scm
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee/math/vector.scm')
-rw-r--r--chickadee/math/vector.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/chickadee/math/vector.scm b/chickadee/math/vector.scm
index 31aff07..2269486 100644
--- a/chickadee/math/vector.scm
+++ b/chickadee/math/vector.scm
@@ -212,13 +212,13 @@ polar coordinate (R, THETA)."
(define-inlinable (vec2-magnitude v)
"Return the magnitude of the vec2 V."
- (sqrt (+ (square (vec2-x v)) (square (vec2-y v)))))
+ (sqrt (+ (* (vec2-x v) (vec2-x v)) (* (vec2-y v) (vec2-y v)))))
(define-inlinable (vec3-magnitude v)
"Return the magnitude of the vec3 V."
- (sqrt (+ (square (vec3-x v))
- (square (vec3-y v))
- (square (vec3-z v)))))
+ (sqrt (+ (* (vec3-x v) (vec3-x v))
+ (* (vec3-y v) (vec3-y v))
+ (* (vec3-z v) (vec3-z v)))))
(define-inlinable (vec2-dot-product v1 v2)
"Return the dot product of the vec2s V1 and V2."