GridSize
Struct in Zigurous.Architecture
Declaration
[Serializable]
public struct GridSize : IEquatable<GridSize>, IComparable<GridSize>
Description
Stores the size of a grid as rows and columns.
Static Properties
zero | Shorthand for writing GridSize(0, 0) . |
one | Shorthand for writing GridSize(1, 1) . |
max | Shorthand for writing GridSize(int.MaxValue, int.MaxValue) . |
sq2 | Shorthand for writing GridSize(2) . |
sq4 | Shorthand for writing GridSize(4) . |
sq8 | Shorthand for writing GridSize(8) . |
sq16 | Shorthand for writing GridSize(16) . |
sq32 | Shorthand for writing GridSize(32) . |
sq64 | Shorthand for writing GridSize(64) . |
sq128 | Shorthand for writing GridSize(128) . |
sq256 | Shorthand for writing GridSize(256) . |
sq512 | Shorthand for writing GridSize(512) . |
sq1024 | Shorthand for writing GridSize(1024) . |
sq2048 | Shorthand for writing GridSize(2048) . |
sq4096 | Shorthand for writing GridSize(4096) . |
sq8192 | Shorthand for writing GridSize(8192) . |
Properties
rows | The number of rows in the grid. |
columns | The number of columns in the grid. |
Area | The area of the grid (rows * columns) (Read only). |
Constructors
GridSize | Creates a new grid size with the specified rows and columns. |
Methods
CompareTo | Compares 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. |
Equals | Checks if the grid size is equal to another grid size. |
GetHashCode | Returns the hash code of the grid size. |
ToString | Converts the grid size to a string. |
Operators
Equality | Determines if two grid sizes are equal. |
Inequality | Determines if two grid sizes are not equal. |