Struct XMInt2
A 2D vector where each component is a signed integer.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMInt2 : IEquatable<XMInt2>
Constructors
| Edit this page View SourceXMInt2(int, int)
Initializes a new instance of the XMInt2 struct.
Declaration
public XMInt2(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
int | x | The x-coordinate of the vector. |
int | y | The y-coordinate of the vector. |
XMInt2(int[])
Initializes a new instance of the XMInt2 struct.
Declaration
public XMInt2(int[] array)
Parameters
Type | Name | Description |
---|---|---|
int[] | array | The components of the vector. |
Properties
| Edit this page View SourceX
Gets or sets the x-coordinate of the vector.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
int |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceEquals(XMInt2)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMInt2 other)
Parameters
Type | Name | Description |
---|---|---|
XMInt2 | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceFromVector(XMVector)
Declaration
public static XMInt2 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMInt2 | A XMInt2. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToVector()
Declaration
public XMVector ToVector()
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMInt2, XMInt2)
Compares two XMInt2 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMInt2 left, XMInt2 right)
Parameters
Type | Name | Description |
---|---|---|
XMInt2 | left | The left XMInt2 to compare. |
XMInt2 | right | The right XMInt2 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMInt2)
Declaration
public static implicit operator XMVector(XMInt2 value)
Parameters
Type | Name | Description |
---|---|---|
XMInt2 | value | A XMInt2. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator XMInt2(XMVector)
Declaration
public static implicit operator XMInt2(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMInt2 | A XMInt2. |
operator !=(XMInt2, XMInt2)
Compares two XMInt2 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMInt2 left, XMInt2 right)
Parameters
Type | Name | Description |
---|---|---|
XMInt2 | left | The left XMInt2 to compare. |
XMInt2 | right | The right XMInt2 to compare. |
Returns
Type | Description |
---|---|
bool |