C# Class UEx.MathX

Most of these are speedups of builtin Lerps, as well as a bunch of extra lerp options
Mostra file Open project: jbruening/unity3d-extensions Class Usage Examples

Public Methods

Method Description
Approx ( float val, float about, float range ) : bool
Approximately ( this a, float other ) : bool

is this float approximately other

Approximately ( this x, float other, float delta ) : bool

is this float within range of other

Berp ( float start, float end, float value ) : float
Bounce ( float x ) : float
Clerp ( float start, float end, float value ) : float
ConvertSeconds ( int time ) : string
Coserp ( float start, float end, float value ) : float
FastInvSqrt ( float x ) : float
FastSqrt ( float x ) : float
GaussFalloff ( float distance, float inRadius ) : float
Hermite ( float start, float end, float value ) : float
InverseLerp ( float from, float to, float value ) : float
InverseLerpUnclamped ( float from, float to, float value ) : float
Lerp ( float from, float to, float value ) : float
LerpUnclamped ( float from, float to, float value ) : float
Sinerp ( float start, float end, float value ) : float
SmoothStep ( float from, float to, float value ) : float
SmoothStepUnclamped ( float from, float to, float value ) : float
SuperLerp ( float from, float to, float from2, float to2, float value ) : float
SuperLerpUnclamped ( float from, float to, float from2, float to2, float value ) : float

Method Details

Approx() public static method

public static Approx ( float val, float about, float range ) : bool
val float
about float
range float
return bool

Approximately() public static method

is this float approximately other
public static Approximately ( this a, float other ) : bool
a this
other float
return bool

Approximately() public static method

is this float within range of other
public static Approximately ( this x, float other, float delta ) : bool
x this
other float
delta float
return bool

Berp() public static method

public static Berp ( float start, float end, float value ) : float
start float
end float
value float
return float

Bounce() public static method

public static Bounce ( float x ) : float
x float
return float

Clerp() public static method

public static Clerp ( float start, float end, float value ) : float
start float
end float
value float
return float

ConvertSeconds() public static method

public static ConvertSeconds ( int time ) : string
time int
return string

Coserp() public static method

public static Coserp ( float start, float end, float value ) : float
start float
end float
value float
return float

FastInvSqrt() public static method

public static FastInvSqrt ( float x ) : float
x float
return float

FastSqrt() public static method

public static FastSqrt ( float x ) : float
x float
return float

GaussFalloff() public static method

public static GaussFalloff ( float distance, float inRadius ) : float
distance float
inRadius float
return float

Hermite() public static method

public static Hermite ( float start, float end, float value ) : float
start float
end float
value float
return float

InverseLerp() public static method

public static InverseLerp ( float from, float to, float value ) : float
from float
to float
value float
return float

InverseLerpUnclamped() public static method

public static InverseLerpUnclamped ( float from, float to, float value ) : float
from float
to float
value float
return float

Lerp() public static method

public static Lerp ( float from, float to, float value ) : float
from float
to float
value float
return float

LerpUnclamped() public static method

public static LerpUnclamped ( float from, float to, float value ) : float
from float
to float
value float
return float

Sinerp() public static method

public static Sinerp ( float start, float end, float value ) : float
start float
end float
value float
return float

SmoothStep() public static method

public static SmoothStep ( float from, float to, float value ) : float
from float
to float
value float
return float

SmoothStepUnclamped() public static method

public static SmoothStepUnclamped ( float from, float to, float value ) : float
from float
to float
value float
return float

SuperLerp() public static method

public static SuperLerp ( float from, float to, float from2, float to2, float value ) : float
from float
to float
from2 float
to2 float
value float
return float

SuperLerpUnclamped() public static method

public static SuperLerpUnclamped ( float from, float to, float from2, float to2, float value ) : float
from float
to float
from2 float
to2 float
value float
return float