Struct XMVector
A vector of four 32-bit floating-point or integer components.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMVector : IEquatable<XMVector>
Constructors
| Edit this page View SourceXMVector(byte[]?)
Initializes a new instance of the XMVector struct.
Declaration
public XMVector(byte[]? array)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | array | The components. |
XMVector(int[]?)
Initializes a new instance of the XMVector struct.
Declaration
public XMVector(int[]? array)
Parameters
| Type | Name | Description |
|---|---|---|
| int[] | array | The components. |
XMVector(float, float, float, float)
Initializes a new instance of the XMVector struct.
Declaration
public XMVector(float x, float y, float z, float w)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x component. |
| float | y | The y component. |
| float | z | The z component. |
| float | w | The w component. |
XMVector(float[]?)
Initializes a new instance of the XMVector struct.
Declaration
public XMVector(float[]? array)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | array | The components. |
XMVector(uint[]?)
Initializes a new instance of the XMVector struct.
Declaration
public XMVector(uint[]? array)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | array | The components. |
Properties
| Edit this page View SourceEpsilon
Gets a vector, each of whose components are epsilon (1.192092896e-7).
Declaration
public static XMVector Epsilon { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
FalseInt
Gets the zero (false) vector.
Declaration
public static XMVector FalseInt { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
Infinity
Gets a vector, each of whose components are infinity (0x7F800000).
Declaration
public static XMVector Infinity { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
IntW
Gets or sets the w component.
Declaration
public uint IntW { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
IntX
Gets or sets the x component.
Declaration
public uint IntX { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
IntY
Gets or sets the y component.
Declaration
public uint IntY { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
IntZ
Gets or sets the z component.
Declaration
public uint IntZ { get; set; }
Property Value
| Type | Description |
|---|---|
| uint |
this[int]
Gets or sets a component by index.
Declaration
public float this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the component. |
Property Value
| Type | Description |
|---|---|
| float | A float value. |
One
Gets a vector, each of whose components are one.
Declaration
public static XMVector One { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
QNaN
Gets a vector, each of whose components are QNaN (0x7CF00000).
Declaration
public static XMVector QNaN { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
SignMask
Gets a vector, each of whose components are the sign mask (0x80000000).
Declaration
public static XMVector SignMask { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
TrueInt
Gets a vector, each of whose components represents true (0xFFFFFFFF).
Declaration
public static XMVector TrueInt { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
W
Gets or sets the w component.
Declaration
public float W { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
X
Gets or sets the x component.
Declaration
public float X { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Y
Gets or sets the y component.
Declaration
public float Y { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Z
Gets or sets the z component.
Declaration
public float Z { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Zero
Gets the zero vector.
Declaration
public static XMVector Zero { get; }
Property Value
| Type | Description |
|---|---|
| XMVector |
Methods
| Edit this page View SourceACos()
Computes the arccosine of each component of a vector.
Declaration
public XMVector ACos()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the arccosine of the corresponding components of V. |
ACosEst()
Estimates the arccosine of each component of a vector.
Declaration
public XMVector ACosEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are estimates of the arccosine of the corresponding components of V. |
ASin()
Computes the arcsine of each component of a vector.
Declaration
public XMVector ASin()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the arcsine of the corresponding components of V. |
ASinEst()
Estimates the arcsine of each component of a vector.
Declaration
public XMVector ASinEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are estimates of the arcsine of the corresponding components of V. |
ATan()
Computes the arctangent of each component of a vector.
Declaration
public XMVector ATan()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the arctangent of the corresponding components of V. |
ATan2(XMVector, XMVector)
Computes the arctangent of Y/ X.
Declaration
public static XMVector ATan2(XMVector y, XMVector x)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | y | The first vector. |
| XMVector | x | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the arctangent of the corresponding Y component divided by the corresponding X component. Each component is in the range (-PI/2, PI/2). |
ATan2Est(XMVector, XMVector)
Estimates the arctangent of Y/ X.
Declaration
public static XMVector ATan2Est(XMVector y, XMVector x)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | y | The first vector. |
| XMVector | x | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the arctangent of the corresponding Y component divided by the corresponding X component. Each component is in the range (-PI/2, PI/2). |
ATanEst()
Estimates the arctangent of each component of a vector.
Declaration
public XMVector ATanEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are estimates of the arctangent of the corresponding components of V. |
Abs()
Computes the absolute value of each component of a vector.
Declaration
public XMVector Abs()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the absolute value of the corresponding components of V. |
Add(XMVector, XMVector)
Computes the sum of two vectors.
Declaration
public static XMVector Add(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector that is the sum of V1 and V2. |
AddAngles(XMVector, XMVector)
Adds two vectors representing angles.
Declaration
public static XMVector AddAngles(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | First vector of angles. Each angle must satisfy |
| XMVector | v2 | Second vector of angles. Each angle must satisfy -XM_2PI <= V2 < XM_2PI. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the sums of the angles of the corresponding components. Each component of the returned vector will be an angle less than XM_PI and greater than or equal to -XM_PI. |
AndComplementInt(XMVector, XMVector)
Computes the logical AND of one vector with the negation of a second vector, treating each component as an unsigned integer.
Declaration
public static XMVector AndComplementInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the logical AND of each of the components of V1 with the negation of the corresponding components of V2. |
AndInt(XMVector, XMVector)
Computes the logical AND of two vectors, treating each component as an unsigned integer.
Declaration
public static XMVector AndInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector each of whose components are the logical AND of the corresponding components of V1 and V2. |
BaryCentric(XMVector, XMVector, XMVector, float, float)
Returns a point in Barycentric coordinates, using the specified position vectors.
Declaration
public static XMVector BaryCentric(XMVector position0, XMVector position1, XMVector position2, float f, float g)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | position0 | The first position. |
| XMVector | position1 | The second position. |
| XMVector | position2 | The third position. |
| float | f | The first weighting factor. |
| float | g | The second weighting factor. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the Barycentric coordinates. |
BaryCentricV(XMVector, XMVector, XMVector, XMVector, XMVector)
Returns a point in Barycentric coordinates, using the specified position vectors.
Declaration
public static XMVector BaryCentricV(XMVector position0, XMVector position1, XMVector position2, XMVector f, XMVector g)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | position0 | The first position. |
| XMVector | position1 | The second position. |
| XMVector | position2 | The third position. |
| XMVector | f | The first weighting factors. |
| XMVector | g | The second weighting factors. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the Barycentric coordinates. |
CatmullRom(XMVector, XMVector, XMVector, XMVector, float)
Performs a Catmull-Rom interpolation, using the specified position vectors.
Declaration
public static XMVector CatmullRom(XMVector position0, XMVector position1, XMVector position2, XMVector position3, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | position0 | The first position. |
| XMVector | position1 | The second position. |
| XMVector | position2 | The third position. |
| XMVector | position3 | The fourth position. |
| float | t | The interpolating control factor. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the results of the Catmull-Rom interpolation. |
CatmullRomV(XMVector, XMVector, XMVector, XMVector, XMVector)
Performs a Catmull-Rom interpolation, using the specified position vectors.
Declaration
public static XMVector CatmullRomV(XMVector position0, XMVector position1, XMVector position2, XMVector position3, XMVector t)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | position0 | The first position. |
| XMVector | position1 | The second position. |
| XMVector | position2 | The third position. |
| XMVector | position3 | The fourth position. |
| XMVector | t | The interpolating control factor for the corresponding components of the position. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the results of the Catmull-Rom interpolation. |
Ceiling()
Computes the ceiling of each component of a vector.
Declaration
public XMVector Ceiling()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the ceiling of the corresponding components of V. |
Clamp(XMVector, XMVector)
Clamps the components of a vector to a specified minimum and maximum range.
Declaration
public XMVector Clamp(XMVector min, XMVector max)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | min | Minimum range vector. |
| XMVector | max | Maximum range vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are clamped to the specified minimum and maximum values. |
ConvertFloatToInt(uint)
Converts an XMVector with float components to an XMVector with int components and applies a uniform bias.
Declaration
public XMVector ConvertFloatToInt(uint mulExponent)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | mulExponent | Each component of the vector will be converted to a |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the converted vector, where each component has been multiplied by two raised to the |
ConvertFloatToUInt(uint)
Converts an XMVector with float components to an XMVector with uint components and applies a uniform bias.
Declaration
public XMVector ConvertFloatToUInt(uint mulExponent)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | mulExponent | Each component of the vector will be converted to a |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the converted vector, where each component has been multiplied by two raised to the |
ConvertIntToFloat(uint)
Converts an XMVector with int components to an XMVector with float components and applies a uniform bias.
Declaration
public XMVector ConvertIntToFloat(uint divExponent)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | divExponent | Each component of the vector will be converted to a float and then divided by two raised to the |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the converted vector, where each component has been divided by two raised to the |
ConvertUIntToFloat(uint)
Converts an XMVector with uint components to an XMVector with float components and applies a uniform bias.
Declaration
public XMVector ConvertUIntToFloat(uint divExponent)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | divExponent | Each component of the vector will be converted to a |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the converted vector, where each component has been divided by two raised to the |
Cos()
Computes the cosine of each component of a vector.
Declaration
public XMVector Cos()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the cosine of the corresponding component of V. |
CosEst()
Estimates the cosine of each component of a vector.
Declaration
public XMVector CosEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the cosine of the corresponding component of V. |
CosH()
Computes the hyperbolic cosine of each component of a vector.
Declaration
public XMVector CosH()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the hyperbolic cosine of the corresponding component of V. |
Divide(XMVector, XMVector)
Divides one instance of XMVECTOR by a second instance, returning the result in a third instance.
Declaration
public static XMVector Divide(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The dividends. |
| XMVector | v2 | The divisors. |
Returns
| Type | Description |
|---|---|
| XMVector | The quotient. |
Equal(XMVector, XMVector)
Performs a per-component test for equality of two vectors.
Declaration
public static XMVector Equal(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
EqualInt(XMVector, XMVector)
Performs a per-component test for the equality of two vectors, treating each component as an unsigned integer.
Declaration
public static XMVector EqualInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
EqualIntR(out XMComparisonRecord, XMVector, XMVector)
Performs a per-component test for equality of two vectors, treating each component as an unsigned integer. In addition, this function sets a comparison value.
Declaration
public static XMVector EqualIntR(out XMComparisonRecord record, XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMComparisonRecord | record | A comparison value. |
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
EqualR(out XMComparisonRecord, XMVector, XMVector)
Performs a per-component test for equality of two vectors and sets a comparison value.
Declaration
public static XMVector EqualR(out XMComparisonRecord record, XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMComparisonRecord | record | A comparison value. |
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
Equals(XMVector)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMVector other)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | 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 SourceExp()
Computes two raised to the power for each component.
Declaration
public XMVector Exp()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are two raised to the power of the corresponding component of V. |
Exp2()
Computes two raised to the power for each component.
Declaration
public XMVector Exp2()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are two raised to the power of the corresponding component of V. |
ExpE()
Computes e (~2.71828) raised to the power for each component.
Declaration
public XMVector ExpE()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are e raised to the power of the corresponding component of V. |
Floor()
Computes the floor of each component of a vector.
Declaration
public XMVector Floor()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the floor of the corresponding components of V. |
FromBinaryConstant(uint, uint, uint, uint)
Creates a vector, each of whose components is either 0.0f or 1.0f.
Declaration
public static XMVector FromBinaryConstant(uint c0, uint c1, uint c2, uint c3)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | c0 | This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C0 is 0, the x-component of the returned vector will be 0.0f. Otherwise, the x-component will be 1.0f. |
| uint | c1 | This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C1 is 0, the y-component of the returned vector will be 0.0f. Otherwise, the y-component will be 1.0f. |
| uint | c2 | This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C2 is 0, the z-component of the returned vector will be 0.0f. Otherwise, the z-component will be 1.0f. |
| uint | c3 | This parameter must be a number (an immediate value, either 0 or 1) and not a variable. If C3 is 0, the w-component of the returned vector will be 0.0f. Otherwise, the w-component will be 1.0f. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components is either 0.0f or 1.0f. |
FromBinaryConstant(uint[]?)
Creates a vector, each of whose components is either 0.0f or 1.0f.
Declaration
public static XMVector FromBinaryConstant(uint[]? constants)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | constants | An array of binary number. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components is either 0.0f or 1.0f. |
FromFloat(float, float, float, float)
Creates a vector using four floating-point values.
Declaration
public static XMVector FromFloat(float x, float y, float z, float w)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x component. |
| float | y | The y component. |
| float | z | The z component. |
| float | w | The w component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
FromInt(uint, uint, uint, uint)
Creates a vector with unsigned integer components.
Declaration
public static XMVector FromInt(uint x, uint y, uint z, uint w)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | x | The x component. |
| uint | y | The y component. |
| uint | z | The z component. |
| uint | w | The w component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
FromSplatConstant(int, uint)
Creates a vector with identical floating-point components. Each component is a constant divided by two raised to an integer exponent.
Declaration
public static XMVector FromSplatConstant(int intConstant, uint divExponent)
Parameters
| Type | Name | Description |
|---|---|---|
| int | intConstant | This value will be converted to a floating-point number and divided by two raised to the |
| uint | divExponent | Describes the exponent applied to the quotient. This parameter must be a number (an immediate value) and not a variable. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector with identical floating-point components. Each component is a constant divided by two raised to an integer exponent. |
FromSplatConstantInt(int)
Creates a vector with identical integer components.
Declaration
public static XMVector FromSplatConstantInt(int intConstant)
Parameters
| Type | Name | Description |
|---|---|---|
| int | intConstant | Value to replicate to each component of the returned vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components is |
GetByIndex(int)
Gets the value of one component by index.
Declaration
public float GetByIndex(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the component. |
Returns
| Type | Description |
|---|---|
| float | The component. |
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 SourceGetIntByIndex(int)
Gets the value of one component by index.
Declaration
public uint GetIntByIndex(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the component. |
Returns
| Type | Description |
|---|---|
| uint | The component. |
Greater(XMVector, XMVector)
Performs a per-component test for greater-than between two vectors.
Declaration
public static XMVector Greater(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
GreaterOrEqual(XMVector, XMVector)
Performs a per-component test for greater-than-or-equal between two vectors.
Declaration
public static XMVector GreaterOrEqual(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
GreaterOrEqualR(out XMComparisonRecord, XMVector, XMVector)
Performs a per-component test for greater-than-or-equal between two vectors and sets a comparison value.
Declaration
public static XMVector GreaterOrEqualR(out XMComparisonRecord record, XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMComparisonRecord | record | A comparison value. |
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
GreaterR(out XMComparisonRecord, XMVector, XMVector)
Performs a per-component test for greater-than between two vectors and sets a comparison value.
Declaration
public static XMVector GreaterR(out XMComparisonRecord record, XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMComparisonRecord | record | A comparison value. |
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
Hermite(XMVector, XMVector, XMVector, XMVector, float)
Performs a Hermite spline interpolation, using the specified vectors.
Declaration
public static XMVector Hermite(XMVector position0, XMVector tangent0, XMVector position1, XMVector tangent1, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | position0 | First position to interpolate from. |
| XMVector | tangent0 | Tangent vector for the first position. |
| XMVector | position1 | Second position to interpolate from. |
| XMVector | tangent1 | Tangent vector for the second position. |
| float | t | Interpolation control factor. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the interpolation. |
HermiteV(XMVector, XMVector, XMVector, XMVector, XMVector)
Performs a Hermite spline interpolation, using the specified vectors.
Declaration
public static XMVector HermiteV(XMVector position0, XMVector tangent0, XMVector position1, XMVector tangent1, XMVector t)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | position0 | First position to interpolate from. |
| XMVector | tangent0 | Tangent vector for the first position. |
| XMVector | position1 | Second position to interpolate from. |
| XMVector | tangent1 | Tangent vector for the second position. |
| XMVector | t | Interpolating control factor for the corresponding components of the position. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the interpolation. |
InBounds(XMVector)
Tests whether the components of a given vector are within set bounds.
Declaration
public XMVector InBounds(XMVector bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | bounds | Vector that determines the bounds. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
InBoundsR(out XMComparisonRecord, XMVector)
Tests whether the components of a given vector are within certain bounds and sets a comparison value.
Declaration
public XMVector InBoundsR(out XMComparisonRecord record, XMVector bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| XMComparisonRecord | record | A comparison value. |
| XMVector | bounds | Vector that determines the bounds. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
Insert(XMVector, XMVector, uint, uint, uint, uint, uint)
Rotates a vector left by a given number of 32-bit components and insert selected elements of that result into another vector.
Declaration
public static XMVector Insert(XMVector vd, XMVector vs, uint leftRotateElements, uint select0, uint select1, uint select2, uint select3)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | vd | Vector to insert into. |
| XMVector | vs | Vector to rotate left. |
| uint | leftRotateElements | Number of 32-bit components by which to rotate VS left. |
| uint | select0 | Either 0 or 1. If one, the x-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the x-component of VD is left alone. |
| uint | select1 | Either 0 or 1. If one, the y-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the y-component of VD is left alone. |
| uint | select2 | Either 0 or 1. If one, the z-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the z-component of VD is left alone. |
| uint | select3 | Either 0 or 1. If one, the w-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the w-component of VD is left alone. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the vector that results from the rotation and insertion. |
IsInfinite()
Performs a per-component test for +/- infinity on a vector.
Declaration
public XMVector IsInfinite()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
IsNaN()
Performs a per-component NaN test on a vector.
Declaration
public XMVector IsNaN()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
Lerp(XMVector, XMVector, float)
Performs a linear interpolation between two vectors.
Declaration
public static XMVector Lerp(XMVector v0, XMVector v1, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v0 | The first vector. |
| XMVector | v1 | The second vector. |
| float | t | The interpolation control factor. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the interpolation. |
LerpV(XMVector, XMVector, XMVector)
Performs a linear interpolation between two vectors.
Declaration
public static XMVector LerpV(XMVector v0, XMVector v1, XMVector t)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v0 | The first vector. |
| XMVector | v1 | The second vector. |
| XMVector | t | The interpolating control factor for the corresponding components of the position. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the interpolation. |
Less(XMVector, XMVector)
Performs a per-component test for less-than between two vectors.
Declaration
public static XMVector Less(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
LessOrEqual(XMVector, XMVector)
Performs a per-component test for less-than-or-equal between two vectors.
Declaration
public static XMVector LessOrEqual(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
Load(XMByte2)
Declaration
public static XMVector Load(XMByte2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByte2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMByte4)
Declaration
public static XMVector Load(XMByte4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByte4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMByteN2)
Declaration
public static XMVector Load(XMByteN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByteN2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMByteN4)
Declaration
public static XMVector Load(XMByteN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByteN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMColorRgba)
Loads an XMColorRgba into an XMVector.
Declaration
public static XMVector Load(XMColorRgba value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMColorRgba | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMDec4)
Declaration
public static XMVector Load(XMDec4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDec4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMDecN4)
Declaration
public static XMVector Load(XMDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMFloat3Packed)
Loads an XMFloat3Packed into an XMVector.
Declaration
public static XMVector Load(XMFloat3Packed value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat3Packed | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMFloat3SharedExponent)
Loads an XMFloat3SharedExponent into an XMVector.
Declaration
public static XMVector Load(XMFloat3SharedExponent value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat3SharedExponent | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMHalf2)
Declaration
public static XMVector Load(XMHalf2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMHalf2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMHalf4)
Declaration
public static XMVector Load(XMHalf4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMHalf4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMShort2)
Declaration
public static XMVector Load(XMShort2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShort2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMShort4)
Declaration
public static XMVector Load(XMShort4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShort4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMShortN2)
Declaration
public static XMVector Load(XMShortN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShortN2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMShortN4)
Declaration
public static XMVector Load(XMShortN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShortN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMU555)
Declaration
public static XMVector Load(XMU555 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMU555 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMU565)
Declaration
public static XMVector Load(XMU565 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMU565 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUByte2)
Declaration
public static XMVector Load(XMUByte2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUByte4)
Declaration
public static XMVector Load(XMUByte4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUByteN2)
Declaration
public static XMVector Load(XMUByteN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByteN2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUByteN4)
Declaration
public static XMVector Load(XMUByteN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByteN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUDec4)
Declaration
public static XMVector Load(XMUDec4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUDec4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUDecN4)
Declaration
public static XMVector Load(XMUDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUDecN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUDecN4XR)
Loads an XMUDecN4XR into an XMVector.
Declaration
public static XMVector Load(XMUDecN4XR value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUDecN4XR | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUNibble4)
Loads an XMUNibble4 into an XMVector.
Declaration
public static XMVector Load(XMUNibble4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUNibble4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUShort2)
Declaration
public static XMVector Load(XMUShort2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShort2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUShort4)
Declaration
public static XMVector Load(XMUShort4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShort4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUShortN2)
Loads an XMUShortN2 into an XMVector.
Declaration
public static XMVector Load(XMUShortN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShortN2 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMUShortN4)
Loads an XMUShortN4 into an XMVector.
Declaration
public static XMVector Load(XMUShortN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShortN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMXDec4)
Declaration
public static XMVector Load(XMXDec4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMXDec4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Load(XMXDecN4)
Declaration
public static XMVector Load(XMXDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMXDecN4 | value | The structure to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadFloat(float)
Loads a floating-point scalar value into an XMVector.
Declaration
public static XMVector LoadFloat(float source)
Parameters
| Type | Name | Description |
|---|---|---|
| float | source | The scalar data to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadFloat2(XMFloat2)
Declaration
public static XMVector LoadFloat2(XMFloat2 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat2 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadFloat3(XMFloat3)
Declaration
public static XMVector LoadFloat3(XMFloat3 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat3 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadFloat4(XMFloat4)
Declaration
public static XMVector LoadFloat4(XMFloat4 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat4 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadInt(uint)
Loads a scalar value into an XMVector.
Declaration
public static XMVector LoadInt(uint source)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | source | The scalar data to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadInt2(uint[]?)
Loads data into the x and y components of an XMVector.
Declaration
public static XMVector LoadInt2(uint[]? source)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | source | The data to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadInt3(uint[]?)
Loads data into the x, y, and z components of an XMVector.
Declaration
public static XMVector LoadInt3(uint[]? source)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | source | The data to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadInt4(uint[]?)
Loads data into the x, y, z, and w components of an XMVector.
Declaration
public static XMVector LoadInt4(uint[]? source)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | source | The data to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadSInt2(XMInt2)
Declaration
public static XMVector LoadSInt2(XMInt2 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt2 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadSInt3(XMInt3)
Declaration
public static XMVector LoadSInt3(XMInt3 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt3 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadSInt4(XMInt4)
Declaration
public static XMVector LoadSInt4(XMInt4 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt4 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadUInt2(XMUInt2)
Declaration
public static XMVector LoadUInt2(XMUInt2 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUInt2 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadUInt3(XMUInt3)
Declaration
public static XMVector LoadUInt3(XMUInt3 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUInt3 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
LoadUInt4(XMUInt4)
Declaration
public static XMVector LoadUInt4(XMUInt4 source)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUInt4 | source | The struct to load. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. |
Log()
Computes the base two logarithm of each component of a vector.
Declaration
public XMVector Log()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are base two logarithm of the corresponding components of V. |
Log2()
Computes the base two logarithm of each component of a vector.
Declaration
public XMVector Log2()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are base two logarithm of the corresponding components of V. |
LogE()
Computes the base e logarithm of each component of a vector. The base e logarithm is also known as the natural logarithm.
Declaration
public XMVector LogE()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are base e logarithm of the corresponding components of V. |
Max(XMVector, XMVector)
Makes a per-component comparison between two vectors, and returns a vector containing the largest components.
Declaration
public static XMVector Max(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the largest components between the two vectors. |
MergeXY(XMVector, XMVector)
Creates a new vector by combining the x and y-components of two vectors.
Declaration
public static XMVector MergeXY(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the merged vector. |
MergeZW(XMVector, XMVector)
Creates a new vector by combining the z and w-components of two vectors.
Declaration
public static XMVector MergeZW(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the merged vector. |
Min(XMVector, XMVector)
Makes a per-component comparison between two vectors, and returns a vector containing the smallest components.
Declaration
public static XMVector Min(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the smallest components between the two vectors. |
Mod(XMVector, XMVector)
Computes the per-component floating-point remainder of the quotient of two vectors.
Declaration
public static XMVector Mod(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The vector dividend. |
| XMVector | v2 | The vector divisor. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the floating-point remainders of the divisions. |
ModAngles(XMVector)
Computes the per-component angle modulo 2PI.
Declaration
public static XMVector ModAngles(XMVector angles)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | angles | The vector of angle components. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the corresponding components of Angles modulo 2PI. |
Multiply(XMVector, XMVector)
Computes the per-component product of two vectors.
Declaration
public static XMVector Multiply(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components is the product of the corresponding components of V1 and V2. |
MultiplyAdd(XMVector, XMVector, XMVector)
Computes the product of the first two vectors added to the third vector.
Declaration
public static XMVector MultiplyAdd(XMVector v1, XMVector v2, XMVector v3)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The vector multiplier. |
| XMVector | v2 | The vector multiplicand. |
| XMVector | v3 | The vector addend. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the product-sum of the vectors. |
NearEqual(XMVector, XMVector, XMVector)
Performs a per-component test for equality of two vectors within a given threshold.
Declaration
public static XMVector NearEqual(XMVector v1, XMVector v2, XMVector epsilon)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
| XMVector | epsilon | Tolerance value used for judging equality. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
Negate()
Computes the negation of a vector.
Declaration
public XMVector Negate()
Returns
| Type | Description |
|---|---|
| XMVector | Returns the negation of the vector. |
NegativeMultiplySubtract(XMVector, XMVector, XMVector)
Computes the difference of a third vector and the product of the first two vectors.
Declaration
public static XMVector NegativeMultiplySubtract(XMVector v1, XMVector v2, XMVector v3)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The vector multiplier. |
| XMVector | v2 | The vector multiplicand. |
| XMVector | v3 | The vector subtrahend. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the resulting vector. |
NorInt(XMVector, XMVector)
Computes the logical NOR of two vectors, treating each component as an unsigned integer.
Declaration
public static XMVector NorInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components are the logical NOR of the corresponding components of V1 and V2. |
NotEqual(XMVector, XMVector)
Performs a per-component test for the inequality of two vectors.
Declaration
public static XMVector NotEqual(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
NotEqualInt(XMVector, XMVector)
Performs a per-component test for the inequality of two vectors, treating each component as an unsigned integer.
Declaration
public static XMVector NotEqualInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector containing the results of each component test. |
OrInt(XMVector, XMVector)
Computes the logical OR of two vectors, treating each component as an unsigned integer.
Declaration
public static XMVector OrInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components are the logical OR of the corresponding components of V1 and V2. |
Permute(XMVector, XMVector, XMPermutation, XMPermutation, XMPermutation, XMPermutation)
Permutes the components of two vectors to create a new vector.
Declaration
public static XMVector Permute(XMVector v1, XMVector v2, XMPermutation permuteX, XMPermutation permuteY, XMPermutation permuteZ, XMPermutation permuteW)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
| XMPermutation | permuteX | Index indicating where the X component of the new vector should be copied from. |
| XMPermutation | permuteY | Index indicating where the Y component of the new vector should be copied from. |
| XMPermutation | permuteZ | Index indicating where the Z component of the new vector should be copied from. |
| XMPermutation | permuteW | Index indicating where the W component of the new vector should be copied from. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the permuted vector that resulted from combining the source vectors. |
Plus()
Performance an identity operation on a vector.
Declaration
public XMVector Plus()
Returns
| Type | Description |
|---|---|
| XMVector | Returns the vector. |
Pow(XMVector, XMVector)
Computes V1 raised to the power of V2.
Declaration
public static XMVector Pow(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the corresponding component of V1 raised to the power of the corresponding component in V2. |
Reciprocal()
Computes the per-component reciprocal of a vector.
Declaration
public XMVector Reciprocal()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the reciprocal of the corresponding component of V. |
ReciprocalEst()
Estimates the per-component reciprocal of a vector.
Declaration
public XMVector ReciprocalEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the reciprocal of the corresponding component of V. |
ReciprocalSqrt()
Computes the per-component reciprocal square root of a vector.
Declaration
public XMVector ReciprocalSqrt()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the reciprocal square-root of the corresponding component of V. |
ReciprocalSqrtEst()
Estimates the per-component reciprocal square root of a vector.
Declaration
public XMVector ReciprocalSqrtEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the reciprocal square-root of the corresponding component of V. |
Replicate(float)
Replicates a floating-point value into all four components of a vector.
Declaration
public static XMVector Replicate(float value)
Parameters
| Type | Name | Description |
|---|---|---|
| float | value | The value to replicate. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, all of whose components are equal to Value. |
ReplicateInt(uint)
Replicates an integer value into all four components of a vector.
Declaration
public static XMVector ReplicateInt(uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | value | The value to replicate. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, all of whose components are equal to Value. |
RotateLeft(uint)
Rotates the vector left by a given number of 32-bit elements.
Declaration
public XMVector RotateLeft(uint elements)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | elements | Number of 32-bit elements by which to rotate V left. This parameter must be 0, 1, 2, or 3. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the rotated vector. |
RotateRight(uint)
Rotates the vector right by a given number of 32-bit elements.
Declaration
public XMVector RotateRight(uint elements)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | elements | Number of 32-bit elements by which to rotate V right. This parameter must be 0, 1, 2, or 3. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the rotated vector. |
Round()
Rounds each component of a vector to the nearest integer.
Declaration
public XMVector Round()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components are rounded to the nearest integer. |
Saturate()
Saturates each component of a vector to the range 0.0f to 1.0f.
Declaration
public XMVector Saturate()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components are saturated. |
Scale(float)
Scalar multiplies a vector by a floating-point value.
Declaration
public XMVector Scale(float factor)
Parameters
| Type | Name | Description |
|---|---|---|
| float | factor | A scalar value. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the scaled vector. |
Select(XMVector, XMVector, XMVector)
Performs a per-component selection between two input vectors and returns the resulting vector.
Declaration
public static XMVector Select(XMVector v1, XMVector v2, XMVector control)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
| XMVector | control | Vector mask used to select a vector component from either V1 or V2. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the result of the per-component selection. |
SelectControl(uint, uint, uint, uint)
Defines a control vector for use in Select(XMVector, XMVector, XMVector).
Declaration
public static XMVector SelectControl(uint index0, uint index1, uint index2, uint index3)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | index0 | Index that determines which vector will be selected to set the X component. |
| uint | index1 | Index that determines which vector will be selected to set the Y component. |
| uint | index2 | Index that determines which vector will be selected to set the Z component. |
| uint | index3 | Index that determines which vector will be selected to set the W component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the control vector. |
SelectControl(uint[]?)
Defines a control vector for use in Select(XMVector, XMVector, XMVector).
Declaration
public static XMVector SelectControl(uint[]? indexes)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | indexes | Indexes that determines which vector will be selected. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the control vector. |
SetByIndex(float, int)
Sets the value of one component by index.
Declaration
public void SetByIndex(float value, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| float | value | The value of the component. |
| int | index | The index of the component. |
SetIntByIndex(uint, int)
Sets the value of one component by index.
Declaration
public void SetIntByIndex(uint value, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | value | The value of the component. |
| int | index | The index of the component. |
ShiftLeft(XMVector, XMVector, uint)
Shifts a vector left by a given number of 32-bit elements, filling the vacated elements with elements from a second vector.
Declaration
public static XMVector ShiftLeft(XMVector v1, XMVector v2, uint elements)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | Vector to shift left. |
| XMVector | v2 | Vector used to fill in the vacated components of V1 after it is shifted left. |
| uint | elements | Number of 32-bit elements by which to shift V left. This parameter must be 0, 1, 2, or 3. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the shifted and filled in vector. |
Sin()
Computes the sine of each component of a vector.
Declaration
public XMVector Sin()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the sine of the corresponding component of V. |
SinCos(out XMVector, out XMVector)
Computes the sine and cosine of each component of a vector.
Declaration
public void SinCos(out XMVector sin, out XMVector cos)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | sin | A vector, each of whose components is the sine of the corresponding component of V. |
| XMVector | cos | A vector, each of whose components is the cosine of the corresponding component of V. |
SinCosEst(out XMVector, out XMVector)
Estimates the sine and cosine of each component of a vector.
Declaration
public void SinCosEst(out XMVector sin, out XMVector cos)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | sin | A vector, each of whose components is an estimate of the sine of the corresponding component of V. |
| XMVector | cos | A vector, each of whose components is an estimate of the cosine of the corresponding component of V. |
SinEst()
Estimates the sine of each component of a vector.
Declaration
public XMVector SinEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the sine of the corresponding component of V. |
SinH()
Computes the hyperbolic sine of each component of a vector.
Declaration
public XMVector SinH()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the hyperbolic sine of the corresponding component of V. |
SplatW(XMVector)
Replicates the w component of a vector to all of the components.
Declaration
public static XMVector SplatW(XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | Vector from which to select the w component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, all of whose components are equal to the w component of V. |
SplatX(XMVector)
Replicates the x component of a vector to all of the components.
Declaration
public static XMVector SplatX(XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | Vector from which to select the x component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, all of whose components are equal to the x component of V. |
SplatY(XMVector)
Replicates the y component of a vector to all of the components.
Declaration
public static XMVector SplatY(XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | Vector from which to select the y component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, all of whose components are equal to the y component of V. |
SplatZ(XMVector)
Replicates the z component of a vector to all of the components.
Declaration
public static XMVector SplatZ(XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | Vector from which to select the z component. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, all of whose components are equal to the z component of V. |
Sqrt()
Computes the per-component square root of a vector.
Declaration
public XMVector Sqrt()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the square-root of the corresponding component of V. |
SqrtEst()
Estimates the per-component square root of a vector.
Declaration
public XMVector SqrtEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the square-root of the corresponding component of V. |
Store(out XMByte2)
Declaration
public void Store(out XMByte2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByte2 | value | The structure at which to store the data |
Store(out XMByte4)
Declaration
public void Store(out XMByte4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByte4 | value | The structure at which to store the data |
Store(out XMByteN2)
Declaration
public void Store(out XMByteN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByteN2 | value | The structure at which to store the data |
Store(out XMByteN4)
Declaration
public void Store(out XMByteN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMByteN4 | value | The structure at which to store the data |
Store(out XMColorRgba)
Stores an XMVector in an XMColorRgba.
Declaration
public void Store(out XMColorRgba value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMColorRgba | value | The structure at which to store the data |
Store(out XMDec4)
Declaration
public void Store(out XMDec4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDec4 | value | The structure at which to store the data |
Store(out XMDecN4)
Declaration
public void Store(out XMDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | value | The structure at which to store the data |
Store(out XMFloat3Packed)
Stores an XMVector in an XMFloat3Packed.
Declaration
public void Store(out XMFloat3Packed value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat3Packed | value | The structure at which to store the data |
Store(out XMFloat3SharedExponent)
Stores an XMVector in an XMFloat3SharedExponent.
Declaration
public void Store(out XMFloat3SharedExponent value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat3SharedExponent | value | The structure at which to store the data |
Store(out XMHalf2)
Declaration
public void Store(out XMHalf2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMHalf2 | value | The structure at which to store the data |
Store(out XMHalf4)
Declaration
public void Store(out XMHalf4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMHalf4 | value | The structure at which to store the data |
Store(out XMShort2)
Declaration
public void Store(out XMShort2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShort2 | value | The structure at which to store the data |
Store(out XMShort4)
Declaration
public void Store(out XMShort4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShort4 | value | The structure at which to store the data |
Store(out XMShortN2)
Declaration
public void Store(out XMShortN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShortN2 | value | The structure at which to store the data |
Store(out XMShortN4)
Declaration
public void Store(out XMShortN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMShortN4 | value | The structure at which to store the data |
Store(out XMU555)
Declaration
public void Store(out XMU555 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMU555 | value | The structure at which to store the data |
Store(out XMU565)
Declaration
public void Store(out XMU565 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMU565 | value | The structure at which to store the data |
Store(out XMUByte2)
Declaration
public void Store(out XMUByte2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte2 | value | The structure at which to store the data |
Store(out XMUByte4)
Declaration
public void Store(out XMUByte4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByte4 | value | The structure at which to store the data |
Store(out XMUByteN2)
Declaration
public void Store(out XMUByteN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByteN2 | value | The structure at which to store the data |
Store(out XMUByteN4)
Declaration
public void Store(out XMUByteN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUByteN4 | value | The structure at which to store the data |
Store(out XMUDec4)
Declaration
public void Store(out XMUDec4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUDec4 | value | The structure at which to store the data |
Store(out XMUDecN4)
Declaration
public void Store(out XMUDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUDecN4 | value | The structure at which to store the data |
Store(out XMUDecN4XR)
Stores an XMVector in an XMUDecN4XR.
Declaration
public void Store(out XMUDecN4XR value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUDecN4XR | value | The structure at which to store the data |
Store(out XMUNibble4)
Stores an XMVector in an XMUNibble4.
Declaration
public void Store(out XMUNibble4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUNibble4 | value | The structure at which to store the data |
Store(out XMUShort2)
Declaration
public void Store(out XMUShort2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShort2 | value | The structure at which to store the data |
Store(out XMUShort4)
Declaration
public void Store(out XMUShort4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShort4 | value | The structure at which to store the data |
Store(out XMUShortN2)
Stores an XMVector in an XMUShortN2.
Declaration
public void Store(out XMUShortN2 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShortN2 | value | The structure at which to store the data |
Store(out XMUShortN4)
Stores an XMVector in an XMUShortN4.
Declaration
public void Store(out XMUShortN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUShortN4 | value | The structure at which to store the data |
Store(out XMXDec4)
Declaration
public void Store(out XMXDec4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMXDec4 | value | The structure at which to store the data |
Store(out XMXDecN4)
Declaration
public void Store(out XMXDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMXDecN4 | value | The structure at which to store the data |
StoreFloat(out float)
Stores an XMVector in a float.
Declaration
public void StoreFloat(out float destination)
Parameters
| Type | Name | Description |
|---|---|---|
| float | destination | The data. |
StoreFloat2(out XMFloat2)
Declaration
public void StoreFloat2(out XMFloat2 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat2 | destination | The data |
StoreFloat3(out XMFloat3)
Declaration
public void StoreFloat3(out XMFloat3 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat3 | destination | The data |
StoreFloat4(out XMFloat4)
Declaration
public void StoreFloat4(out XMFloat4 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMFloat4 | destination | The data |
StoreInt(out uint)
Stores an XMVector in a uint.
Declaration
public void StoreInt(out uint destination)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | destination | The data. |
StoreInt2(out uint[])
Stores an XMVector in a 2-element uint array.
Declaration
public void StoreInt2(out uint[] destination)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | destination | The data. |
StoreInt3(out uint[])
Stores an XMVector in a 3-element uint array.
Declaration
public void StoreInt3(out uint[] destination)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | destination | The data. |
StoreInt4(out uint[])
Stores an XMVector in a 4-element uint array.
Declaration
public void StoreInt4(out uint[] destination)
Parameters
| Type | Name | Description |
|---|---|---|
| uint[] | destination | The data. |
StoreSInt2(out XMInt2)
Declaration
public void StoreSInt2(out XMInt2 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt2 | destination | The data |
StoreSInt3(out XMInt3)
Declaration
public void StoreSInt3(out XMInt3 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt3 | destination | The data |
StoreSInt4(out XMInt4)
Declaration
public void StoreSInt4(out XMInt4 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMInt4 | destination | The data |
StoreUInt2(out XMUInt2)
Declaration
public void StoreUInt2(out XMUInt2 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUInt2 | destination | The data |
StoreUInt3(out XMUInt3)
Declaration
public void StoreUInt3(out XMUInt3 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUInt3 | destination | The data |
StoreUInt4(out XMUInt4)
Declaration
public void StoreUInt4(out XMUInt4 destination)
Parameters
| Type | Name | Description |
|---|---|---|
| XMUInt4 | destination | The data |
Subtract(XMVector, XMVector)
Computes the difference of two vectors.
Declaration
public static XMVector Subtract(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector that is the difference of V1 and V2. |
SubtractAngles(XMVector, XMVector)
Subtracts two vectors representing angles.
Declaration
public static XMVector SubtractAngles(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | First vector of angles. Each angle must satisfy -XM_PI <= V1 < XM_PI. |
| XMVector | v2 | Second vector of angles. Each angle must satisfy -XM_2PI <= V1 < XM_2PI. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are the differences of the angles of the corresponding components. Each component of the returned vector will be an angle less than XM_PI and greater than or equal to -XM_PI. |
Swizzle(XMSwizzle, XMSwizzle, XMSwizzle, XMSwizzle)
Swizzles a vector.
Declaration
public XMVector Swizzle(XMSwizzle e0, XMSwizzle e1, XMSwizzle e2, XMSwizzle e3)
Parameters
| Type | Name | Description |
|---|---|---|
| XMSwizzle | e0 | Index that describes which component of V to place in the x-component of the swizzled vector. |
| XMSwizzle | e1 | Index that describes which component of V to place in the y-component of the swizzled vector. |
| XMSwizzle | e2 | Index that describes which component of V to place in the z-component of the swizzled vector. |
| XMSwizzle | e3 | Index that describes which component of V to place in the w-component of the swizzled vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the swizzled vector. |
Swizzle(XMSwizzle[]?)
Swizzles a vector.
Declaration
public XMVector Swizzle(XMSwizzle[]? elements)
Parameters
| Type | Name | Description |
|---|---|---|
| XMSwizzle[] | elements | The swizzle indexes. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the swizzled vector. |
Tan()
Computes the tangent of each component of a vector.
Declaration
public XMVector Tan()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the tangent of the corresponding component of V. |
TanEst()
Estimates the tangent of each component of a vector.
Declaration
public XMVector TanEst()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is an estimate of the tangent of the corresponding component of V. |
TanH()
Computes the hyperbolic tangent of each component of a vector.
Declaration
public XMVector TanH()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector. Each component is the hyperbolic tangent of the corresponding component of V. |
ToArray()
Convert a vector to an array of float.
Declaration
public float[] ToArray()
Returns
| Type | Description |
|---|---|
| float[] | An array of float. |
Truncate()
Rounds each component of a vector to the nearest integer value in the direction of zero.
Declaration
public XMVector Truncate()
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector whose components are rounded to the nearest integer value in the direction of zero. |
XorInt(XMVector, XMVector)
Computes the logical XOR of two vectors, treating each component as an unsigned integer.
Declaration
public static XMVector XorInt(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components are the logical XOR of the corresponding components of V1 and V2. |
Operators
| Edit this page View Sourceoperator +(XMVector, XMVector)
Computes the sum of two vectors.
Declaration
public static XMVector operator +(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector that is the sum of V1 and V2. |
operator /(XMVector, XMVector)
Divides one instance of XMVECTOR by a second instance, returning the result in a third instance.
Declaration
public static XMVector operator /(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The dividends. |
| XMVector | v2 | The divisors. |
Returns
| Type | Description |
|---|---|
| XMVector | The quotient. |
operator /(XMVector, float)
Divides a vector by a scalar value, returning the result in a third instance.
Declaration
public static XMVector operator /(XMVector v, float s)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | The vector. |
| float | s | A scalar value. |
Returns
| Type | Description |
|---|---|
| XMVector | The quotient. |
operator ==(XMVector, XMVector)
Compares two XMVector objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMVector left, XMVector right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | left | The left XMVector to compare. |
| XMVector | right | The right XMVector to compare. |
Returns
| Type | Description |
|---|---|
| bool |
implicit operator float[](XMVector)
Convert a vector to an array of float.
Declaration
public static implicit operator float[](XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | The vector. |
Returns
| Type | Description |
|---|---|
| float[] | An array of float. |
operator !=(XMVector, XMVector)
Compares two XMVector objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMVector left, XMVector right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | left | The left XMVector to compare. |
| XMVector | right | The right XMVector to compare. |
Returns
| Type | Description |
|---|---|
| bool |
operator *(XMVector, XMVector)
Computes the per-component product of two vectors.
Declaration
public static XMVector operator *(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector, each of whose components is the product of the corresponding components of V1 and V2. |
operator *(XMVector, float)
Scalar multiplies a vector by a floating-point value.
Declaration
public static XMVector operator *(XMVector v, float s)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | The vector. |
| float | s | A scalar value. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the scaled vector. |
operator *(float, XMVector)
Scalar multiplies a vector by a floating-point value.
Declaration
public static XMVector operator *(float s, XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| float | s | A scalar value. |
| XMVector | v | The vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the scaled vector. |
operator -(XMVector, XMVector)
Computes the difference of two vectors.
Declaration
public static XMVector operator -(XMVector v1, XMVector v2)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v1 | The first vector. |
| XMVector | v2 | The second vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns a vector that is the difference of V1 and V2. |
operator -(XMVector)
Computes the negation of a vector.
Declaration
public static XMVector operator -(XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | The vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the negation of the vector. |
operator +(XMVector)
Performance an identity operation on a vector.
Declaration
public static XMVector operator +(XMVector v)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | v | The vector. |
Returns
| Type | Description |
|---|---|
| XMVector | Returns the vector. |