diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-03-12 13:20:55 -0600 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-03-12 13:20:55 -0600 |
commit | 89c49902749b4e93e98f1858fc26a32c0c2708b7 (patch) | |
tree | ca8853f9324fea14b0ffc964fb34b8d6fe2279cd /tests/core/math/test_vector2.h | |
parent | d7019de7e3c416e5492d1508b39c9b25adc2483a (diff) | |
download | redot-engine-89c49902749b4e93e98f1858fc26a32c0c2708b7.tar.gz |
Fix Slerp C# docs and add test cases for vectors in the same direction
Diffstat (limited to 'tests/core/math/test_vector2.h')
-rw-r--r-- | tests/core/math/test_vector2.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/core/math/test_vector2.h b/tests/core/math/test_vector2.h index ff60467bf4..9b7800164a 100644 --- a/tests/core/math/test_vector2.h +++ b/tests/core/math/test_vector2.h @@ -90,6 +90,9 @@ TEST_CASE("[Vector2] Interpolation methods") { Vector2(5, 0).slerp(Vector2(0, 5), 0.5).is_equal_approx(Vector2(5, 5) * Math_SQRT12), "Vector2 slerp with non-normalized values should work as expected."); CHECK_MESSAGE( + Vector2(1, 1).slerp(Vector2(2, 2), 0.5).is_equal_approx(Vector2(1.5, 1.5)), + "Vector2 slerp with colinear inputs should behave as expected."); + CHECK_MESSAGE( Vector2().slerp(Vector2(), 0.5) == Vector2(), "Vector2 slerp with both inputs as zero vectors should return a zero vector."); CHECK_MESSAGE( |