PerpDot returns the perp dot product between OP and OQ, i.e. zero if aligned and |OP|*|OQ| if perpendicular. This is the cross product in two dimensions.
(q Point)
| 310 | |
| 311 | // PerpDot returns the perp dot product between OP and OQ, i.e. zero if aligned and |OP|*|OQ| if perpendicular. This is the cross product in two dimensions. |
| 312 | func (p Point) PerpDot(q Point) float64 { |
| 313 | return p.X*q.Y - p.Y*q.X |
| 314 | } |
| 315 | |
| 316 | // Length returns the length of OP. |
| 317 | func (p Point) Length() float64 { |
no outgoing calls