MCPcopy Index your code
hub / github.com/EngoEngine/engo / Equal

Method Equal

math.go:123–125  ·  view source on GitHub ↗

Equal indicates whether two points have the same value, avoiding issues with float precision

(p2 Point)

Source from the content-addressed store, hash-verified

121
122// Equal indicates whether two points have the same value, avoiding issues with float precision
123func (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
128func (p *Point) PointDistance(p2 Point) float32 {

Callers 15

TestPointSetFunction · 0.95
TestPointEqualFunction · 0.80
TestPointProjectOntoFunction · 0.80
TestPointNormalizeFunction · 0.80
TestLineNormalFunction · 0.80
TestLineTraceFunction · 0.80
TestMultiplyMatrixPointFunction · 0.80
TestSpaceComponent_AABBFunction · 0.80
TestCameraMoveXFunction · 0.80
TestCameraMoveYFunction · 0.80

Calls 1

FloatEqualFunction · 0.85

Tested by 15

TestPointSetFunction · 0.76
TestPointEqualFunction · 0.64
TestPointProjectOntoFunction · 0.64
TestPointNormalizeFunction · 0.64
TestLineNormalFunction · 0.64
TestLineTraceFunction · 0.64
TestMultiplyMatrixPointFunction · 0.64
TestSpaceComponent_AABBFunction · 0.64
TestCameraMoveXFunction · 0.64
TestCameraMoveYFunction · 0.64