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