summaryrefslogtreecommitdiff
path: root/tests/math/vector.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/math/vector.scm')
-rw-r--r--tests/math/vector.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/math/vector.scm b/tests/math/vector.scm
index e87c241..c3fc900 100644
--- a/tests/math/vector.scm
+++ b/tests/math/vector.scm
@@ -38,8 +38,13 @@
(vec2-magnitude (vec2 0.0 0.0)) 0.0))
(test-equal "vec2-dot"
(vec2-dot (vec2 1.0 2.0) (vec2 3.0 4.0)) 11.0)
- (test-equal "vec2-cross"
- (vec2-cross (vec2 1.0 2.0) (vec2 3.0 4.0)) -5.0)
+ (test-group "vec2-cross"
+ (test-equal "same line"
+ (vec2-cross (vec2 1.0 2.0) (vec2 2.0 4.0)) 0.0)
+ (test-equal "clockwise"
+ (vec2-cross (vec2 1.0 2.0) (vec2 0.0 2.0)) 2.0)
+ (test-equal "counter-clockwise"
+ (vec2-cross (vec2 1.0 2.0) (vec2 2.0 0.0)) -4.0))
(test-approximate "vec2-normalize"
(vec2-magnitude (vec2-normalize (vec2 3.7 4.9))) 1.0 0.001)
(test-group "vec2*"