|
@@ -83,13 +83,13 @@ TEST_CASE("[Curve] Custom curve with free tangents") {
|
|
|
Math::is_equal_approx(curve->interpolate(-0.1), 0),
|
|
|
"Custom free curve should return the expected value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.1), 0.352),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.1), (real_t)0.352),
|
|
|
"Custom free curve should return the expected value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.4), 0.352),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.4), (real_t)0.352),
|
|
|
"Custom free curve should return the expected value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.7), 0.896),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.7), (real_t)0.896),
|
|
|
"Custom free curve should return the expected value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
Math::is_equal_approx(curve->interpolate(1), 1),
|
|
@@ -102,13 +102,13 @@ TEST_CASE("[Curve] Custom curve with free tangents") {
|
|
|
Math::is_equal_approx(curve->interpolate_baked(-0.1), 0),
|
|
|
"Custom free curve should return the expected baked value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.1), 0.352),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.1), (real_t)0.352),
|
|
|
"Custom free curve should return the expected baked value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.4), 0.352),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.4), (real_t)0.352),
|
|
|
"Custom free curve should return the expected baked value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.7), 0.896),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.7), (real_t)0.896),
|
|
|
"Custom free curve should return the expected baked value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
Math::is_equal_approx(curve->interpolate_baked(1), 1),
|
|
@@ -172,13 +172,13 @@ TEST_CASE("[Curve] Custom curve with linear tangents") {
|
|
|
Math::is_equal_approx(curve->interpolate(-0.1), 0),
|
|
|
"Custom linear curve should return the expected value at offset -0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.1), 0.4),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.1), (real_t)0.4),
|
|
|
"Custom linear curve should return the expected value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.4), 0.4),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.4), (real_t)0.4),
|
|
|
"Custom linear curve should return the expected value at offset 0.4.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.7), 0.8),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.7), (real_t)0.8),
|
|
|
"Custom linear curve should return the expected value at offset 0.7.");
|
|
|
CHECK_MESSAGE(
|
|
|
Math::is_equal_approx(curve->interpolate(1), 1),
|
|
@@ -191,13 +191,13 @@ TEST_CASE("[Curve] Custom curve with linear tangents") {
|
|
|
Math::is_equal_approx(curve->interpolate_baked(-0.1), 0),
|
|
|
"Custom linear curve should return the expected baked value at offset -0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.1), 0.4),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.1), (real_t)0.4),
|
|
|
"Custom linear curve should return the expected baked value at offset 0.1.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.4), 0.4),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.4), (real_t)0.4),
|
|
|
"Custom linear curve should return the expected baked value at offset 0.4.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.7), 0.8),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.7), (real_t)0.8),
|
|
|
"Custom linear curve should return the expected baked value at offset 0.7.");
|
|
|
CHECK_MESSAGE(
|
|
|
Math::is_equal_approx(curve->interpolate_baked(1), 1),
|
|
@@ -210,10 +210,10 @@ TEST_CASE("[Curve] Custom curve with linear tangents") {
|
|
|
curve->remove_point(10);
|
|
|
ERR_PRINT_ON;
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate(0.7), 0.8),
|
|
|
+ Math::is_equal_approx(curve->interpolate(0.7), (real_t)0.8),
|
|
|
"Custom free curve should return the expected value at offset 0.7 after removing point at invalid index 10.");
|
|
|
CHECK_MESSAGE(
|
|
|
- Math::is_equal_approx(curve->interpolate_baked(0.7), 0.8),
|
|
|
+ Math::is_equal_approx(curve->interpolate_baked(0.7), (real_t)0.8),
|
|
|
"Custom free curve should return the expected baked value at offset 0.7 after removing point at invalid index 10.");
|
|
|
}
|
|
|
} // namespace TestCurve
|