()
| 175 | } |
| 176 | |
| 177 | func (point Vector) Normalized() Vector { |
| 178 | dist := point.Distance(Vector{0, 0}) |
| 179 | return Vector{point.X / dist, point.Y / dist} |
| 180 | } |
| 181 | |
| 182 | func (point Vector) Rounded() Vector { |
| 183 | return Vector{float32(math.Round(float64(point.X))), float32(math.Round(float64(point.Y)))} |