Recast  1
Game with custom magic
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Functions
MathUtils Namespace Reference

Functions

template<typename T >
lerp (T a, T b, double t)
 
double randomFloat ()
 

Detailed Description

Collection of functions which work with numbers.

Function Documentation

template<typename T >
T MathUtils::lerp ( a,
b,
double  t 
)
inline

Makes value a to be more "similar" to value b by factor t.

Template Parameters
TAny number, e.g. double.
Parameters
aFirst value.
bSecond Value.
tFactor.
Returns
Linear interpolated value.

Here is the caller graph for this function:

double MathUtils::randomFloat ( )
inline

Generates random value between 0.0 and 1.0.

Returns
Random value between 0.0 and 1.0.

Here is the caller graph for this function: