Class XMScalar
The scalar functions provided by DirectXMath.
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public static class XMScalar
Methods
| Edit this page View SourceACos(float)
Computes the arccosine of a floating-point number.
Declaration
public static float ACos(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | A value between -1.0f and 1.0f. |
Returns
Type | Description |
---|---|
float | Returns the inverse cosine of Value. |
ACosEst(float)
Estimates the arccosine of a floating-point number.
Declaration
public static float ACosEst(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | A value between -1.0f and 1.0f. |
Returns
Type | Description |
---|---|
float | Returns the inverse cosine of Value. |
ASin(float)
Computes the arcsine of a floating-point number.
Declaration
public static float ASin(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | A value between -1.0f and 1.0f. |
Returns
Type | Description |
---|---|
float | Returns the inverse sine of Value. |
ASinEst(float)
Estimates the arcsine of a floating-point number.
Declaration
public static float ASinEst(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | A value between -1.0f and 1.0f. |
Returns
Type | Description |
---|---|
float | Returns the inverse sine of Value. |
Cos(float)
Computes the cosine of a radian angle.
Declaration
public static float Cos(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | The radian angle. |
Returns
Type | Description |
---|---|
float | Returns the cosine of Value. |
CosEst(float)
Estimates the cosine of a radian angle.
Declaration
public static float CosEst(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | The radian angle. |
Returns
Type | Description |
---|---|
float | Returns the cosine of Value. |
ModAngle(float)
Computes an angle between -XM_PI and XM_PI.
Declaration
public static float ModAngle(float angle)
Parameters
Type | Name | Description |
---|---|---|
float | angle | The radian angle. |
Returns
Type | Description |
---|---|
float | Returns an angle greater than or equal to -XM_PI and less than XM_PI that is congruent to Value modulo 2pi. |
NearEqual(float, float, float)
Determines if two floating-point values are nearly equal.
Declaration
public static bool NearEqual(float s1, float s2, float epsilon)
Parameters
Type | Name | Description |
---|---|---|
float | s1 | The first floating-point value to compare. |
float | s2 | The second floating-point value to compare. |
float | epsilon | The tolerance to use when comparing S1 and S2. |
Returns
Type | Description |
---|---|
bool | Returns true if the absolute value of the difference between S1 and S2 is less than or equal to Epsilon. Returns false otherwise. |
Sin(float)
Computes the sine of a radian angle.
Declaration
public static float Sin(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | The radian angle. |
Returns
Type | Description |
---|---|
float | Returns the sine of Value. |
SinCos(out float, out float, float)
Computes both the sine and cosine of a radian angle.
Declaration
public static void SinCos(out float sin, out float cos, float value)
Parameters
Type | Name | Description |
---|---|---|
float | sin | The sine of Value. |
float | cos | The cosine of Value. |
float | value | The radian angle. |
SinCosEst(out float, out float, float)
Estimates both the sine and cosine of a radian angle.
Declaration
public static void SinCosEst(out float sin, out float cos, float value)
Parameters
Type | Name | Description |
---|---|---|
float | sin | The sine of Value. |
float | cos | The cosine of Value. |
float | value | The radian angle. |
SinEst(float)
Estimates the sine of a radian angle.
Declaration
public static float SinEst(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value | The radian angle. |
Returns
Type | Description |
---|---|
float | Returns an estimate of the sine of Value. |