Mathf

Mathf Class

Floating point math constants and utilities.

Syntax

public static class Mathf

Remarks

Provides common floating point constants static methods.

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from object.

Public Fields

const
DegreesPerRadian float (57.29578). Conversion factor to convert radians to degrees.
const
E float (2.718282). E
const
PI float (3.141593). Pi
const
PiOverTwo float (1.570796). Pi divided by two.
const
RadiansPerDegree float (0.01745329). Conversion factor to convert degrees to radians.
const
RootTwo float (1.414214). The square root of two.
const
RootTwoOverTwo float (0.7071068). The square root of 2 divided by two.
const
TwoOverPi float (0.6366197). Two divided by pi.
const
TwoPi float (6.283185). Two times pi.

Public Methods

static
IsApproximatelyEqualAbsolute (floatfloat) : bool
Compares the two given floats and returns true if they are approximately equal

Member Details

DegreesPerRadian Field

Conversion factor to convert radians to degrees.

Value: 57.29578

Syntax

public const float DegreesPerRadian

Remarks

 

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

E Field

E

Value: 2.718282

Syntax

public const float E

Remarks

 

Requirements

Namespace: 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

Syntax

public 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

Checks if the absolute value of the difference of the values is small.

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

PI Field

Pi

Value: 3.141593

Syntax

public const float PI

Remarks

 

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

PiOverTwo Field

Pi divided by two.

Value: 1.570796

Syntax

public const float PiOverTwo

Remarks

 

Requirements

Namespace: 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

Syntax

public const float RadiansPerDegree

Remarks

 

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

RootTwo Field

The square root of two.

Value: 1.414214

Syntax

public const float RootTwo

Remarks

 

Requirements

Namespace: 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

Syntax

public const float RootTwoOverTwo

Remarks

 

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

TwoOverPi Field

Two divided by pi.

Value: 0.6366197

Syntax

public const float TwoOverPi

Remarks

 

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0

TwoPi Field

Two times pi.

Value: 6.283185

Syntax

public const float TwoPi

Remarks

 

Requirements

Namespace: Sansar
Assembly: Sansar.Script (in Sansar.Script.dll)
Assembly Versions: 1.0.0.0


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.