C# Class LeopotamGroup.Math.MathFast

Holder of extensions / helpers.
ファイルを表示 Open project: Leopotam/LeopotamGroupLibraryUnity

Public Methods

Method Description
Atan2 ( float y, float x ) : float

Fast Atan2 with 0.02 threshold error.

Cos ( float v ) : float

Fast Cos with 0.0003 threshold error.

NormalizedFast ( this v ) : Vector2

Fast Vector2 normalization with 0.001 threshold error.

NormalizedFast ( this v ) : Vector3

Fast Vector3 normalization with 0.001 threshold error.

Sin ( float v ) : float

Fast Sin with 0.0003 threshold error.

Private Methods

Method Description
MathFast ( ) : System.Runtime.InteropServices

Method Details

Atan2() public static method

Fast Atan2 with 0.02 threshold error.
public static Atan2 ( float y, float x ) : float
y float
x float
return float

Cos() public static method

Fast Cos with 0.0003 threshold error.
public static Cos ( float v ) : float
v float Angle in radians.
return float

NormalizedFast() public static method

Fast Vector2 normalization with 0.001 threshold error.
public static NormalizedFast ( this v ) : Vector2
v this
return UnityEngine.Vector2

NormalizedFast() public static method

Fast Vector3 normalization with 0.001 threshold error.
public static NormalizedFast ( this v ) : Vector3
v this
return UnityEngine.Vector3

Sin() public static method

Fast Sin with 0.0003 threshold error.
public static Sin ( float v ) : float
v float Angle in radians.
return float