Equal indicates whether two points have the same value, avoiding issues with float precision
(p2 Point)
| 121 | |
| 122 | // Equal indicates whether two points have the same value, avoiding issues with float precision |
| 123 | func (p *Point) Equal(p2 Point) bool { |
| 124 | return FloatEqual(p.X, p2.X) && FloatEqual(p.Y, p2.Y) |
| 125 | } |
| 126 | |
| 127 | // PointDistance returns the euclidean distance between p and p2 |
| 128 | func (p *Point) PointDistance(p2 Point) float32 { |