comparison OrthancStone/Sources/Scene2D/ScenePoint2D.h @ 1875:b896f20d24ca

added UnionOfRectangles algorithm
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Jan 2022 19:59:40 +0100
parents 7053b8a0aaec
children 07964689cb0b
comparison
equal deleted inserted replaced
1874:08f2476e8f5e 1875:b896f20d24ca
86 86
87 // Distance from point p to [a,b] segment 87 // Distance from point p to [a,b] segment
88 static double SquaredDistancePtSegment(const ScenePoint2D& a, 88 static double SquaredDistancePtSegment(const ScenePoint2D& a,
89 const ScenePoint2D& b, 89 const ScenePoint2D& b,
90 const ScenePoint2D& p); 90 const ScenePoint2D& p);
91
92 bool IsEqual(const ScenePoint2D& other) const
93 {
94 return LinearAlgebra::IsCloseToZero(DistancePtPt(*this, other));
95 }
91 }; 96 };
92 } 97 }