Class AxMath
Inheritance
System.Object
AxMath
Namespace: Aximo
Assembly: AxCommon.dll
Syntax
public static class AxMath
Fields
|
Improve this Doc
View Source
Deg2Rad
Degrees-to-radians conversion constant
Declaration
public const float Deg2Rad = 0.0174532924F
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Norm2Rad
Normal-to-radians conversion constant. Normal: 0f..1f
Declaration
public const float Norm2Rad = 6.28318548F
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Rad2Deg
Radians-to-degrees conversion constant
Declaration
public const float Rad2Deg = 57.29578F
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Rad2Norm
Radians-to-normal conversion constant. Normal: 0f..1f
Declaration
public const float Rad2Norm = 0.159154937F
Field Value
Type |
Description |
System.Single |
|
Methods
|
Improve this Doc
View Source
Approximately(Single, Single)
Declaration
public static bool Approximately(float a, float b)
Parameters
Type |
Name |
Description |
System.Single |
a |
|
System.Single |
b |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CosDeg(Single)
Declaration
public static float CosDeg(float deg)
Parameters
Type |
Name |
Description |
System.Single |
deg |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
CosNorm(Single)
Declaration
public static float CosNorm(float norm)
Parameters
Type |
Name |
Description |
System.Single |
norm |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Declaration
public static Vector2 Map(Vector2 input, Vector2 fromMin, Vector2 fromMax, Vector2 toMin, Vector2 toMax)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
input |
|
OpenToolkit.Mathematics.Vector2 |
fromMin |
|
OpenToolkit.Mathematics.Vector2 |
fromMax |
|
OpenToolkit.Mathematics.Vector2 |
toMin |
|
OpenToolkit.Mathematics.Vector2 |
toMax |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector2 |
|
|
Improve this Doc
View Source
Map(Single, Single, Single, Single, Single)
Declaration
public static float Map(float input, float fromMin, float fromMax, float toMin, float toMax)
Parameters
Type |
Name |
Description |
System.Single |
input |
|
System.Single |
fromMin |
|
System.Single |
fromMax |
|
System.Single |
toMin |
|
System.Single |
toMax |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Declaration
public static Vector2 MapFromNDC(Vector2 input, Vector2 toMax)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
input |
|
OpenToolkit.Mathematics.Vector2 |
toMax |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector2 |
|
|
Improve this Doc
View Source
Declaration
public static Vector2 MapFromNDC(Vector2 input, Vector2i toMax)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
input |
|
OpenToolkit.Mathematics.Vector2i |
toMax |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector2 |
|
|
Improve this Doc
View Source
MapFromNDC(Single, Single, Single, Single, Single)
Declaration
public static float MapFromNDC(float input, float fromMin, float fromMax, float toMin, float toMax)
Parameters
Type |
Name |
Description |
System.Single |
input |
|
System.Single |
fromMin |
|
System.Single |
fromMax |
|
System.Single |
toMin |
|
System.Single |
toMax |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Declaration
public static Vector2 MapToNDC(Vector2 input, Vector2 fromMax)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
input |
|
OpenToolkit.Mathematics.Vector2 |
fromMax |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector2 |
|
|
Improve this Doc
View Source
MapToNDC(Single, Single, Single)
Declaration
public static float MapToNDC(float input, float fromMin, float fromMax)
Parameters
Type |
Name |
Description |
System.Single |
input |
|
System.Single |
fromMin |
|
System.Single |
fromMax |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
NormalizedToRadians(Single)
Declaration
public static float NormalizedToRadians(float normalizedAngle)
Parameters
Type |
Name |
Description |
System.Single |
normalizedAngle |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Declaration
public static Quaternion QuaternionFromNormalizedAngles(Vector3 normalizedAngle)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector3 |
normalizedAngle |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Quaternion |
|
|
Improve this Doc
View Source
QuaternionFromNormalizedAngles(Single, Single, Single)
Declaration
public static Quaternion QuaternionFromNormalizedAngles(float rotationX, float rotationY, float rotationZ)
Parameters
Type |
Name |
Description |
System.Single |
rotationX |
|
System.Single |
rotationY |
|
System.Single |
rotationZ |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Quaternion |
|
|
Improve this Doc
View Source
Declaration
public static Vector3 Round(this Vector3 vec)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector3 |
vec |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector3 |
|
|
Improve this Doc
View Source
Declaration
public static Vector3 Round(this Vector3 vec, int digits)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector3 |
vec |
|
System.Int32 |
digits |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector3 |
|
|
Improve this Doc
View Source
SinDeg(Single)
Declaration
public static float SinDeg(float deg)
Parameters
Type |
Name |
Description |
System.Single |
deg |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
SinNorm(Single)
Declaration
public static float SinNorm(float norm)
Parameters
Type |
Name |
Description |
System.Single |
norm |
|
Returns
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
Declaration
public static Quaternion ToQuaternion(this Vector3 normalizedAngle)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector3 |
normalizedAngle |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Quaternion |
|
|
Improve this Doc
View Source
Declaration
public static Vector2i ToVector2i(this Vector2 vec)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
vec |
|
Returns
Type |
Description |
OpenToolkit.Mathematics.Vector2i |
|