GridConfiguration
Namespace: Murder.Core
Assembly: Murder.dll
public sealed struct GridConfiguration
⭐ Constructors
public GridConfiguration(int cellSize)
Default constructor
Parameters
cellSize
int
⭐ Properties
CellDimensions
public readonly Point CellDimensions;
A point that is GridConfiguration.CellSize.
Returns
Point
CellSize
public readonly int CellSize;
Size of this grid's individual cell.
Returns
int
HalfCellDimensions
public readonly Point HalfCellDimensions;
A point that is GridConfiguration.HalfCellSize.
Returns
Point
HalfCellSize
public readonly int HalfCellSize;
GridConfiguration.CellSize divided by two.
Returns
int
⭐ Methods
CeilToGrid(float)
public int CeilToGrid(float value)
Find in which cell of the grid a value would land, rounding up.
Parameters
value
float
Returns
int
FloorToGrid(float)
public int FloorToGrid(float value)
Find in which cell of the grid a value would land, rounding down.
Parameters
value
float
Returns
int
RoundToGrid(float)
public int RoundToGrid(float value)
Find in which cell of the grid a value would land, with default [Calculator.RoundToInt(System.Single)](../../Murder/Utilities/Calculator.html#roundtoint(float) behavior.
Parameters
value
float
Returns
int
⚡