C# Class AssemblyCSharp.MathUtil

Mostra file Open project: wooga/ps_social_jam

Public Methods

Method Description
AlmostEqual ( float a, float b ) : bool
AlmostEqual ( float a, float b, float epsilon ) : bool
LerpTo ( float &parameter, float value, float t ) : void
Map ( float val, float from1, float to1, float from2, float to2 ) : float
RoundToInt ( float f, MidpointRounding mode = MidpointRounding.AwayFromZero ) : int

Method Details

AlmostEqual() public static method

public static AlmostEqual ( float a, float b ) : bool
a float
b float
return bool

AlmostEqual() public static method

public static AlmostEqual ( float a, float b, float epsilon ) : bool
a float
b float
epsilon float
return bool

LerpTo() public static method

public static LerpTo ( float &parameter, float value, float t ) : void
parameter float
value float
t float
return void

Map() public static method

public static Map ( float val, float from1, float to1, float from2, float to2 ) : float
val float
from1 float
to1 float
from2 float
to2 float
return float

RoundToInt() public static method

public static RoundToInt ( float f, MidpointRounding mode = MidpointRounding.AwayFromZero ) : int
f float
mode MidpointRounding
return int