Struct XMShortN2
A 2D vector for storing signed, normalized values as signed 16-bit integers.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMShortN2 : IEquatable<XMShortN2>
Constructors
| Edit this page View SourceXMShortN2(short, short)
Initializes a new instance of the XMShortN2 struct.
Declaration
public XMShortN2(short x, short y)
Parameters
Type | Name | Description |
---|---|---|
short | x | The x-coordinate of the vector. |
short | y | The y-coordinate of the vector. |
XMShortN2(short[])
Initializes a new instance of the XMShortN2 struct.
Declaration
public XMShortN2(short[] array)
Parameters
Type | Name | Description |
---|---|---|
short[] | array | The components of the vector. |
XMShortN2(float, float)
Initializes a new instance of the XMShortN2 struct.
Declaration
public XMShortN2(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
float | x | The x-coordinate of the vector. |
float | y | The y-coordinate of the vector. |
XMShortN2(float[])
Initializes a new instance of the XMShortN2 struct.
Declaration
public XMShortN2(float[] array)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The components of the vector. |
XMShortN2(uint)
Initializes a new instance of the XMShortN2 struct.
Declaration
public XMShortN2(uint packed)
Parameters
Type | Name | Description |
---|---|---|
uint | packed | A packed value representing the vector. |
Properties
| Edit this page View SourceX
Gets or sets the x-coordinate of the vector.
Declaration
public short X { get; set; }
Property Value
Type | Description |
---|---|
short |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public short Y { get; set; }
Property Value
Type | Description |
---|---|
short |
Methods
| Edit this page View SourceEquals(XMShortN2)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMShortN2 other)
Parameters
Type | Name | Description |
---|---|---|
XMShortN2 | 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 XMShortN2 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMShortN2 | A XMShortN2. |
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 ==(XMShortN2, XMShortN2)
Compares two XMShortN2 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMShortN2 left, XMShortN2 right)
Parameters
Type | Name | Description |
---|---|---|
XMShortN2 | left | The left XMShortN2 to compare. |
XMShortN2 | right | The right XMShortN2 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMShortN2)
Declaration
public static implicit operator XMVector(XMShortN2 value)
Parameters
Type | Name | Description |
---|---|---|
XMShortN2 | value | A XMShortN2. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator XMShortN2(XMVector)
Declaration
public static implicit operator XMShortN2(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMShortN2 | A XMShortN2. |
operator !=(XMShortN2, XMShortN2)
Compares two XMShortN2 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMShortN2 left, XMShortN2 right)
Parameters
Type | Name | Description |
---|---|---|
XMShortN2 | left | The left XMShortN2 to compare. |
XMShortN2 | right | The right XMShortN2 to compare. |
Returns
Type | Description |
---|---|
bool |