| 28 | #include <geode/tests/common.hpp> |
| 29 | |
| 30 | void test_length() |
| 31 | { |
| 32 | const geode::Vector3D p{ { 1, 2, 4 } }; |
| 33 | geode::OpenGeodeGeometryException::test( |
| 34 | p.length() == std::sqrt( 1 + 4 + 16 ), "Wrong vector length" ); |
| 35 | |
| 36 | const auto p_normalized = p.normalize(); |
| 37 | geode::OpenGeodeGeometryException::test( |
| 38 | p_normalized.length() == 1, "Wrong vector length" ); |
| 39 | } |
| 40 | |
| 41 | void test_operations() |
| 42 | { |