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