()
| 191 | } |
| 192 | |
| 193 | func (point Vector) CeilToGrid() Vector { |
| 194 | return Vector{ |
| 195 | X: float32(math.Ceil(float64(point.X/globals.GridSize)) * float64(globals.GridSize)), |
| 196 | Y: float32(math.Ceil(float64(point.Y/globals.GridSize)) * float64(globals.GridSize)), |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | func (point Vector) Angle() float32 { |
| 201 | return float32(math.Atan2(-float64(point.Y), float64(point.X))) |