MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / inexact_equal

Method inexact_equal

src/geode/geometry/point.cpp:160–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158
159 template < index_t dimension >
160 bool Point< dimension >::inexact_equal( const Point &other ) const
161 {
162 double square_length{ 0 };
163 static constexpr auto SQR_EPSILON = GLOBAL_EPSILON * GLOBAL_EPSILON;
164 for( const auto i : LRange{ dimension } )
165 {
166 const double diff{ other.value( i ) - this->value( i ) };
167 square_length += diff * diff;
168 if( square_length > SQR_EPSILON )
169 {
170 return false;
171 }
172 }
173 return true;
174 }
175
176 template < index_t dimension >
177 std::string Point< dimension >::string() const

Callers

nothing calls this directly

Calls 1

valueMethod · 0.95

Tested by

no test coverage detected