MCPcopy Create free account
hub / github.com/tdewolff/canvas / Angle

Method Angle

util.go:327–329  ·  view source on GitHub ↗

Angle returns the angle in radians [0,2PI) between the x-axis and OP.

()

Source from the content-addressed store, hash-verified

325
326// Angle returns the angle in radians [0,2PI) between the x-axis and OP.
327func (p Point) Angle() float64 {
328 return angleNorm(math.Atan2(p.Y, p.X))
329}
330
331// AngleBetween returns the angle in radians [-PI,PI] from OP to OQ.
332func (p Point) AngleBetween(q Point) float64 {

Callers 15

TestPointFunction · 0.95
CCWMethod · 0.80
TransformMethod · 0.80
MarkersMethod · 0.80
parseDefsMethod · 0.80
TestIntersectionLineLineFunction · 0.80
TestIntersectionLineQuadFunction · 0.80
intersectionLineLineFunction · 0.80
intersectionLineQuadFunction · 0.80
intersectionLineCubeFunction · 0.80
intersectionLineCircleFunction · 0.80
intersectionLineEllipseFunction · 0.80

Calls 1

angleNormFunction · 0.85

Tested by 3

TestPointFunction · 0.76
TestIntersectionLineLineFunction · 0.64
TestIntersectionLineQuadFunction · 0.64