()
| 167 | } |
| 168 | |
| 169 | func (point Vector) Length() float32 { |
| 170 | return point.Distance(Vector{0, 0}) |
| 171 | } |
| 172 | |
| 173 | func (point Vector) Equals(other Vector) bool { |
| 174 | return math.Abs(float64(point.X-other.X)) < 0.1 && math.Abs(float64(point.Y-other.Y)) < 0.1 |