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