Mathf
Mathf Class
Floating point math constants and utilities.
Syntax
public static class Mathf
Member Details
Clamp Method
Clamps a float to the specified range
SyntaxParameters
x
The float to compare.
min
The minimum of the clamp range.
max
The maximum of the clamp range.
Returns
x if x is within [min,max] otherwise min or max, whichever is closer to the value of x.
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
DegreesPerRadian Field
Conversion factor to convert radians to degrees.
Value: 57.29578
Syntaxpublic const float DegreesPerRadian
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
E Field
E
Value: 2.718282
Syntax
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
IsApproximatelyEqualAbsolute Method
Compares the two given floats and returns true if they are approximately equal
Syntaxpublic static bool IsApproximatelyEqualAbsolute (float a, float b)
Parameters
a
The first float to compare.
b
The second float to compare.
Returns
true if the float are approximately equal, false otherwise.
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
PI Field
Pi
Value: 3.141593
Syntaxpublic const float PI
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
PiOverTwo Field
Pi divided by two.
Value: 1.570796
Syntaxpublic const float PiOverTwo
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
RadiansPerDegree Field
Conversion factor to convert degrees to radians.
Value: 0.01745329
Syntaxpublic const float RadiansPerDegree
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
RootTwo Field
The square root of two.
Value: 1.414214
Syntaxpublic const float RootTwo
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
RootTwoOverTwo Field
The square root of 2 divided by two.
Value: 0.7071068
Syntaxpublic const float RootTwoOverTwo
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
TwoOverPi Field
Two divided by pi.
Value: 0.6366197
Syntaxpublic const float TwoOverPi
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
TwoPi Field
Two times pi.
Value: 6.283185
Syntaxpublic const float TwoPi
Remarks
RequirementsNamespace: Sansar Assembly: Sansar.Script (in Sansar.Script.dll) Assembly Versions: 1.0.0.0
Last updated