summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-08 09:54:20 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-08 09:54:20 +0200
commit4c30718102f2487b31a6202e18cec08efc44f117 (patch)
treeb005fe480dbfd3925ca902eabb1495ebc064e830 /tests
parent63ed5749ace68cce8662611aea85562959361e78 (diff)
parent26feefa91ce5016de507c658bfafb4d3b84b8a6c (diff)
downloadredot-engine-4c30718102f2487b31a6202e18cec08efc44f117.tar.gz
Merge pull request #91615 from Frozenfire92/remap-doc-nan-note
Add docs note about remap returning undefined when istart == istop
Diffstat (limited to 'tests')
-rw-r--r--tests/core/math/test_math_funcs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/core/math/test_math_funcs.h b/tests/core/math/test_math_funcs.h
index 0a9d9c97d9..f2eae3a20d 100644
--- a/tests/core/math/test_math_funcs.h
+++ b/tests/core/math/test_math_funcs.h
@@ -381,6 +381,9 @@ TEST_CASE_TEMPLATE("[Math] remap", T, float, double) {
CHECK(Math::remap((T)-100.0, (T)-100.0, (T)-200.0, (T)0.0, (T)-1000.0) == doctest::Approx((T)0.0));
CHECK(Math::remap((T)-200.0, (T)-100.0, (T)-200.0, (T)0.0, (T)-1000.0) == doctest::Approx((T)-1000.0));
CHECK(Math::remap((T)-250.0, (T)-100.0, (T)-200.0, (T)0.0, (T)-1000.0) == doctest::Approx((T)-1500.0));
+
+ // Note: undefined behaviour can happen when `p_istart == p_istop`. We don't bother testing this as it will
+ // vary between hardware and compilers properly implementing IEEE 754.
}
TEST_CASE_TEMPLATE("[Math] angle_difference", T, float, double) {