| 30 | #include <geode/tests/common.hpp> |
| 31 | |
| 32 | void test_comparison() |
| 33 | { |
| 34 | const geode::Point3D p{ { 2, 1.0, 2.6 } }; |
| 35 | const geode::Point3D p2 = p; |
| 36 | |
| 37 | geode::OpenGeodeGeometryException::test( |
| 38 | p == p2, "Points should be equal" ); |
| 39 | const geode::Point2D P{ { 15, 2.6 } }; |
| 40 | const geode::Point2D P2{ { 16, 2.6 } }; |
| 41 | geode::OpenGeodeGeometryException::test( |
| 42 | P != P2, "Points should be different" ); |
| 43 | |
| 44 | const geode::Point3D p_epsilon{ { 2.0000000001, 1, 2.6 } }; |
| 45 | geode::OpenGeodeGeometryException::test( |
| 46 | p.inexact_equal( p_epsilon ), "Points should be almost equal" ); |
| 47 | } |
| 48 | |
| 49 | void test_operators() |
| 50 | { |
no test coverage detected