Struct Int2
A 2-component vector of 32-bit signed integers.
public struct Int2
- Inherited Members
Constructors
Int2(I32)
Initializes a new instance with both components set to the same value.
public Int2(I32 value)
Parameters
valueI32
Int2(I32, I32)
Initializes a new instance of the Int2 struct.
public Int2(I32 x, I32 y)
Parameters
Fields
X
The X component.
public I32 X
Field Value
Y
The Y component.
public I32 Y
Field Value
Properties
One
Gets the one vector.
public static Int2 One { get; }
Property Value
Zero
Gets the zero vector.
public static Int2 Zero { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator +(Int2, Int2)
Adds two vectors.
public static Int2 operator +(Int2 left, Int2 right)
Parameters
Returns
operator /(Int2, I32)
Divides a vector by a scalar.
public static Int2 operator /(Int2 left, I32 right)
Parameters
Returns
operator /(Int2, Int2)
Divides two vectors component-wise.
public static Int2 operator /(Int2 left, Int2 right)
Parameters
Returns
operator *(I32, Int2)
Multiplies a scalar by a vector.
public static Int2 operator *(I32 left, Int2 right)
Parameters
Returns
operator *(Int2, I32)
Multiplies a vector by a scalar.
public static Int2 operator *(Int2 left, I32 right)
Parameters
Returns
operator *(Int2, Int2)
Multiplies two vectors component-wise.
public static Int2 operator *(Int2 left, Int2 right)
Parameters
Returns
operator -(Int2, Int2)
Subtracts two vectors.
public static Int2 operator -(Int2 left, Int2 right)
Parameters
Returns
operator -(Int2)
Negates a vector.
public static Int2 operator -(Int2 value)
Parameters
valueInt2