# 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
>
> #### Syntax
>
> **Parameters**
>
> > *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
>
> #### Requirements
>
> **Namespace:** 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
>
> #### Syntax
>
> public const [float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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
>
> #### 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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **IsApproximatelyEqualAbsolute** ([float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) a, [float](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) 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
>
> #### 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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **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](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Single) **TwoPi**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

***
