GridSize


Declaration

[Serializable]
public struct GridSize : IEquatable<GridSize>, IComparable<GridSize>

Description

Stores the size of a grid as rows and columns.

Static Properties

zeroShorthand for writing GridSize(0, 0).
oneShorthand for writing GridSize(1, 1).
maxShorthand for writing GridSize(int.MaxValue, int.MaxValue).
sq2Shorthand for writing GridSize(2).
sq4Shorthand for writing GridSize(4).
sq8Shorthand for writing GridSize(8).
sq16Shorthand for writing GridSize(16).
sq32Shorthand for writing GridSize(32).
sq64Shorthand for writing GridSize(64).
sq128Shorthand for writing GridSize(128).
sq256Shorthand for writing GridSize(256).
sq512Shorthand for writing GridSize(512).
sq1024Shorthand for writing GridSize(1024).
sq2048Shorthand for writing GridSize(2048).
sq4096Shorthand for writing GridSize(4096).
sq8192Shorthand for writing GridSize(8192).

Properties

rowsThe number of rows in the grid.
columnsThe number of columns in the grid.
AreaThe area of the grid (rows * columns) (Read only).

Constructors

GridSizeCreates a new grid size with the specified rows and columns.

Methods

CompareToCompares this instance with another and returns an integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the other instance.
EqualsChecks if the grid size is equal to another grid size.
GetHashCodeReturns the hash code of the grid size.
ToStringConverts the grid size to a string.

Operators

EqualityDetermines if two grid sizes are equal.
InequalityDetermines if two grid sizes are not equal.