|
31 | 31 |
|
32 | 32 | import core.math; |
33 | 33 |
|
| 34 | +using namespace draco; |
| 35 | + |
34 | 36 | TEST_SUITE("math") { |
35 | 37 | TEST_CASE("pow") { |
36 | | - float result = draco::math::pow(2.0f, 0.5f); |
37 | | - constexpr float expected = draco::math::SQRT2; |
| 38 | + f32 result = draco::math::pow(2.0f, 0.5f); |
| 39 | + constexpr f32 expected = draco::math::SQRT2; |
38 | 40 | CHECK_EQ(result, expected); |
39 | 41 | } |
40 | 42 |
|
@@ -308,8 +310,8 @@ TEST_SUITE("vector2") { |
308 | 310 | ); |
309 | 311 |
|
310 | 312 | SUBCASE("float") { |
311 | | - static constexpr float smaller_length = 1.0f; |
312 | | - static constexpr float larger_length = 10.0f; |
| 313 | + static constexpr f32 smaller_length = 1.0f; |
| 314 | + static constexpr f32 larger_length = 10.0f; |
313 | 315 |
|
314 | 316 | const Vector2 result_smaller = min_length(a, smaller_length); |
315 | 317 | const Vector2 result_swapped = min_length(smaller_length, a); |
@@ -357,8 +359,8 @@ TEST_SUITE("vector2") { |
357 | 359 | ); |
358 | 360 |
|
359 | 361 | SUBCASE("float") { |
360 | | - static constexpr float smaller_length = 1.0f; |
361 | | - static constexpr float larger_length = 10.0f; |
| 362 | + static constexpr f32 smaller_length = 1.0f; |
| 363 | + static constexpr f32 larger_length = 10.0f; |
362 | 364 |
|
363 | 365 | const Vector2 result_smaller = max_length(a, smaller_length); |
364 | 366 | const Vector2 result_swapped = max_length(larger_length, a); |
@@ -763,8 +765,8 @@ TEST_SUITE("vector3") { |
763 | 765 | ); |
764 | 766 |
|
765 | 767 | SUBCASE("float") { |
766 | | - static constexpr float smaller_length = 1.0f; |
767 | | - static constexpr float larger_length = 10.0f; |
| 768 | + static constexpr f32 smaller_length = 1.0f; |
| 769 | + static constexpr f32 larger_length = 10.0f; |
768 | 770 |
|
769 | 771 | const Vector3 result_smaller = min_length(a, smaller_length); |
770 | 772 | const Vector3 result_swapped = min_length(smaller_length, a); |
@@ -812,8 +814,8 @@ TEST_SUITE("vector3") { |
812 | 814 | ); |
813 | 815 |
|
814 | 816 | SUBCASE("float") { |
815 | | - static constexpr float smaller_length = 1.0f; |
816 | | - static constexpr float larger_length = 10.0f; |
| 817 | + static constexpr f32 smaller_length = 1.0f; |
| 818 | + static constexpr f32 larger_length = 10.0f; |
817 | 819 |
|
818 | 820 | const Vector3 result_smaller = max_length(a, smaller_length); |
819 | 821 | const Vector3 result_swapped = max_length(larger_length, a); |
@@ -1254,8 +1256,8 @@ TEST_SUITE("vector4") { |
1254 | 1256 | ); |
1255 | 1257 |
|
1256 | 1258 | SUBCASE("float") { |
1257 | | - static constexpr float smaller_length = 1.0f; |
1258 | | - static constexpr float larger_length = 10.0f; |
| 1259 | + static constexpr f32 smaller_length = 1.0f; |
| 1260 | + static constexpr f32 larger_length = 10.0f; |
1259 | 1261 |
|
1260 | 1262 | const Vector4 result_smaller = min_length(a, smaller_length); |
1261 | 1263 | const Vector4 result_swapped = min_length(smaller_length, a); |
@@ -1303,8 +1305,8 @@ TEST_SUITE("vector4") { |
1303 | 1305 | ); |
1304 | 1306 |
|
1305 | 1307 | SUBCASE("float") { |
1306 | | - static constexpr float smaller_length = 1.0f; |
1307 | | - static constexpr float larger_length = 10.0f; |
| 1308 | + static constexpr f32 smaller_length = 1.0f; |
| 1309 | + static constexpr f32 larger_length = 10.0f; |
1308 | 1310 |
|
1309 | 1311 | const Vector4 result_smaller = max_length(a, smaller_length); |
1310 | 1312 | const Vector4 result_swapped = max_length(larger_length, a); |
|
0 commit comments