Struct XMUByte2
A 2D vector where each component is a unsigned integer, 8-bits (1 byte) in length.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "XMU", Justification = "Reviewed")]
public struct XMUByte2 : IEquatable<XMUByte2>
Constructors
| Edit this page View SourceXMUByte2(byte, byte)
Initializes a new instance of the XMUByte2 struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "x", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "y", Justification = "Reviewed")]
public XMUByte2(byte x, byte y)
Parameters
| Type | Name | Description |
|---|---|---|
| byte | x | The x-coordinate of the vector. |
| byte | y | The y-coordinate of the vector. |
XMUByte2(byte[])
Initializes a new instance of the XMUByte2 struct.
Declaration
public XMUByte2(byte[] array)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | array | The components of the vector. |
XMUByte2(ReadOnlySpan<byte>)
Initializes a new instance of the XMUByte2 struct.
Declaration
public XMUByte2(ReadOnlySpan<byte> array)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | array | The components of the vector. |
XMUByte2(ReadOnlySpan<float>)
Initializes a new instance of the XMUByte2 struct.
Declaration
public XMUByte2(ReadOnlySpan<float> array)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<float> | array | The components of the vector. |
XMUByte2(float, float)
Initializes a new instance of the XMUByte2 struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "x", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "y", Justification = "Reviewed")]
public XMUByte2(float x, float y)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x-coordinate of the vector. |
| float | y | The y-coordinate of the vector. |
XMUByte2(float[])
Initializes a new instance of the XMUByte2 struct.
Declaration
public XMUByte2(float[] array)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | array | The components of the vector. |
XMUByte2(ushort)
Initializes a new instance of the XMUByte2 struct.
Declaration
public XMUByte2(ushort packed)
Parameters
| Type | Name | Description |
|---|---|---|
| ushort | packed | A packed value representing the vector. |
Properties
| Edit this page View SourceX
Gets or sets the x-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "X", Justification = "Reviewed")]
public byte X { get; set; }
Property Value
| Type | Description |
|---|---|
| byte |
Y
Gets or sets the y-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Y", Justification = "Reviewed")]
public byte Y { get; set; }
Property Value
| Type | Description |
|---|---|
| byte |
Methods
| Edit this page View SourceEquals(XMUByte2)
Declaration
public readonly bool Equals(XMUByte2 other)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte2 | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceFromVector(XMVector)
Declaration
public static XMUByte2 FromVector(XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | A XMVector. |
Returns
| Type | Description |
|---|---|
| XMUByte2 | A XMUByte2. |
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceToVector()
Declaration
public XMVector ToVector()
Returns
| Type | Description |
|---|---|
| XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMUByte2, XMUByte2)
Declaration
public static bool operator ==(XMUByte2 left, XMUByte2 right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte2 | left | |
| XMUByte2 | right |
Returns
| Type | Description |
|---|---|
| bool |
implicit operator XMVector(XMUByte2)
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMVector(XMUByte2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte2 | value | A XMUByte2. |
Returns
| Type | Description |
|---|---|
| XMVector | A XMVector. |
implicit operator XMUByte2(XMVector)
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMUByte2(XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | A XMVector. |
Returns
| Type | Description |
|---|---|
| XMUByte2 | A XMUByte2. |
operator !=(XMUByte2, XMUByte2)
Declaration
public static bool operator !=(XMUByte2 left, XMUByte2 right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte2 | left | |
| XMUByte2 | right |
Returns
| Type | Description |
|---|---|
| bool |