MCPcopy
hub / github.com/tdewolff/canvas / AngleBetween

Method AngleBetween

util.go:332–334  ·  view source on GitHub ↗

AngleBetween returns the angle in radians [-PI,PI] from OP to OQ.

(q Point)

Source from the content-addressed store, hash-verified

330
331// AngleBetween returns the angle in radians [-PI,PI] from OP to OQ.
332func (p Point) AngleBetween(q Point) float64 {
333 return math.Atan2(p.PerpDot(q), p.Dot(q))
334}
335
336// Norm normalises OP to be of given length.
337func (p Point) Norm(length float64) Point {

Callers 6

TestPointFunction · 0.95
QuadToMethod · 0.80
CubeToMethod · 0.80
CloseMethod · 0.80
optimizeCloseMethod · 0.80
JoinMethod · 0.80

Calls 2

PerpDotMethod · 0.95
DotMethod · 0.95

Tested by 1

TestPointFunction · 0.76