MCPcopy Create free account
hub / github.com/SolarLune/masterplan / CeilToGrid

Method CeilToGrid

utils.go:193–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191}
192
193func (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
200func (point Vector) Angle() float32 {
201 return float32(math.Atan2(-float64(point.Y), float64(point.X)))

Callers 1

DrawGridMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected