Example #1
0
// Div returns the quotient of p / k as a new Point.
func (p Point) Div(k float64) Point {
	return Point{p.X / linear.Distance(k), p.Y / linear.Distance(k)}
}
Example #2
0
// Mul returns the product of p * k as a new Point.
func (p Point) Mul(k float64) Point {
	return Point{p.X * linear.Distance(k), p.Y * linear.Distance(k)}
}