Struct ArrayPoint
This class is used for accessing 2D arrays.
It is mainly used as a convenient wrapper for returning results of coordinate calculations.
[Version(1, 0, 0)]
[Serializable]
public struct ArrayPoint : IEquatable<ArrayPoint>
- Implements
- Inherited Members
- Extension Methods
Constructors
ArrayPoint(int, int)
Constructs a new ArrayPoint with the given coordinates.
public ArrayPoint(int x, int y)
Parameters
Fields
One
public static readonly ArrayPoint One
Field Value
Zero
public static readonly ArrayPoint Zero
Field Value
Properties
X
Returns the x-coordinate of this coordinate pair.
public int X { get; }
Property Value
Y
Returns the y-coordinate of this coordinate pair.
public int Y { get; }
Property Value
Methods
Add(ArrayPoint, ArrayPoint)
public static ArrayPoint Add(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
Equals(ArrayPoint)
public bool Equals(ArrayPoint other)
Parameters
other
ArrayPoint
Returns
Equals(object)
public override bool Equals(object other)
Parameters
other
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Max(ArrayPoint, ArrayPoint)
public static ArrayPoint Max(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
Min(ArrayPoint, ArrayPoint)
public static ArrayPoint Min(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
Subtract(ArrayPoint, ArrayPoint)
public static ArrayPoint Subtract(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
ToString()
Converts this ArrayPoint into a string.
public override string ToString()
Returns
- string
The result is the string "(x, y)".
Operators
operator +(ArrayPoint, ArrayPoint)
public static ArrayPoint operator +(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
operator ==(ArrayPoint, ArrayPoint)
public static bool operator ==(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
operator !=(ArrayPoint, ArrayPoint)
public static bool operator !=(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint
Returns
operator -(ArrayPoint, ArrayPoint)
public static ArrayPoint operator -(ArrayPoint p1, ArrayPoint p2)
Parameters
p1
ArrayPointp2
ArrayPoint