You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Add notes for remap's return when istart and istop are the same
Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com> Co-Authored-By: kleonc <9283098+kleonc@users.noreply.github.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user