Struct NoxCellRange
- Namespace
- Nox.Grid
- Assembly
- Nox.Grid.dll
A rectangular cell range (inclusive). Normalized on creation so that top/left are the smaller values.
public readonly struct NoxCellRange : IEquatable<NoxCellRange>
- Implements
- Inherited Members
Constructors
NoxCellRange(int, int, int, int)
Creates a range from two corner cells (in any order).
public NoxCellRange(int row1, int column1, int row2, int column2)
Parameters
Properties
Bottom
Last row of the range.
public int Bottom { get; }
Property Value
ColumnCount
Number of columns in the range.
public int ColumnCount { get; }
Property Value
Left
First column of the range.
public int Left { get; }
Property Value
Right
Last column of the range.
public int Right { get; }
Property Value
RowCount
Number of rows in the range.
public int RowCount { get; }
Property Value
Top
First row of the range.
public int Top { get; }
Property Value
Methods
Contains(int, int)
Whether the cell is inside the range.
public bool Contains(int row, int column)
Parameters
Returns
ContainsRow(int)
Whether the row is inside the range.
public bool ContainsRow(int row)
Parameters
rowint
Returns
Equals(NoxCellRange)
Whether the two ranges cover the same cells.
public bool Equals(NoxCellRange other)
Parameters
otherNoxCellRange
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(NoxCellRange, NoxCellRange)
Whether the two values are equal.
public static bool operator ==(NoxCellRange a, NoxCellRange b)
Parameters
Returns
operator !=(NoxCellRange, NoxCellRange)
Whether the two values differ.
public static bool operator !=(NoxCellRange a, NoxCellRange b)