Interface IGridCalculator
- Namespace
- MoonBark.GridPlacement.Core.Interfaces
- Assembly
- MoonBark.GridPlacement.Core.dll
Interface for grid calculation operations.
public interface IGridCalculator
Methods
GetGridSize()
Get grid size
(int width, int height) GetGridSize()
Returns
GridToWorld(int, int)
Calculate world position from grid position
(float x, float y) GridToWorld(int gridX, int gridY)
Parameters
Returns
IsInBounds(float, float)
Check if position is within grid bounds
bool IsInBounds(float x, float y)
Parameters
Returns
IsValidGrid(int, int)
Check if grid coordinates are valid
bool IsValidGrid(int x, int y)
Parameters
Returns
SnapToGrid(float, float)
Snap position to grid
(float x, float y) SnapToGrid(float worldX, float worldY)
Parameters
Returns
WorldToGrid(float, float)
Calculate grid position from world position
(int x, int y) WorldToGrid(float worldX, float worldY)