AngleBetween returns the angle in radians [-PI,PI] from OP to OQ.
(q Point)
| 330 | |
| 331 | // AngleBetween returns the angle in radians [-PI,PI] from OP to OQ. |
| 332 | func (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. |
| 337 | func (p Point) Norm(length float64) Point { |