Class XMMath
Constants and functions provided by XMMath.
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public static class XMMath
Fields
| Edit this page View SourceOneDivPI
An optimal representation of 1/π.
Declaration
public const float OneDivPI = 0.31830987
Field Value
Type | Description |
---|---|
float |
OneDivTwoPI
An optimal representation of 2/π.
Declaration
public const float OneDivTwoPI = 0.15915494
Field Value
Type | Description |
---|---|
float |
PI
An optimal representation of π.
Declaration
public const float PI = 3.1415927
Field Value
Type | Description |
---|---|
float |
PIDivFour
An optimal representation of π/4.
Declaration
public const float PIDivFour = 0.7853982
Field Value
Type | Description |
---|---|
float |
PIDivTwo
An optimal representation of π/2.
Declaration
public const float PIDivTwo = 1.5707964
Field Value
Type | Description |
---|---|
float |
TwoPI
An optimal representation of 2*π.
Declaration
public const float TwoPI = 6.2831855
Field Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceConvertToDegrees(float)
Converts an angle measured in radians into one measured in degrees.
Declaration
public static float ConvertToDegrees(float radians)
Parameters
Type | Name | Description |
---|---|---|
float | radians | Size of an angle in radians. |
Returns
Type | Description |
---|---|
float | Size of the angle in degrees. |
ConvertToRadians(float)
Converts an angle measured in degrees into one measured in radians.
Declaration
public static float ConvertToRadians(float degrees)
Parameters
Type | Name | Description |
---|---|---|
float | degrees | Size of an angle in degrees. |
Returns
Type | Description |
---|---|
float | Size of the angle in radians. |
FresnelTerm(XMVector, XMVector)
Calculates the Fresnel term for unpolarized light.
Declaration
public static XMVector FresnelTerm(XMVector cosIncidentAngle, XMVector refractionIndex)
Parameters
Type | Name | Description |
---|---|---|
XMVector | cosIncidentAngle | Vector consisting of the cosines of the incident angles. |
XMVector | refractionIndex | Vector consisting of the refraction indices of the materials corresponding to the incident angles. |
Returns
Type | Description |
---|---|
XMVector | Returns a vector containing the Fresnel term of each component. |