DI-Guy Lua AI SDK
 All Classes Files Functions Variables Groups Pages
math Class Reference

Lua's built in math library. More...

Static Public Member Functions

static abs (v)
 returns absolute value of v More...
 
static acos (v)
 returns arc cosine value of v in radians More...
 
static asin (v)
 returns arc sine value of v in radians More...
 
static atan (v)
 returns arc tangent value of v in radians More...
 
static atan2 (v1, v2)
 returns arc tangent value of v1/v2 in radians More...
 
static ceil (v)
 returns smallest integer >= v More...
 
static cos (rad)
 returns cosine value of angle rad More...
 
static deg (rad)
 returns angle in degrees of radians rad More...
 
static exp (v)
 returns e^v More...
 
static floor (v)
 returns largest integer <= v More...
 
static frexp (v)
 returns mantissa [0.5,1) and exponent values of v More...
 
static ldexp (v1, v2)
 returns v1*2^v2 More...
 
static log (v)
 returns natural logarithm of v More...
 
static log10 (v)
 returns logarithm 10 of v More...
 
static max (v1,...)
 returns maximum in a list of one or more values More...
 
static min (v1,...)
 returns minimum in a list of one or more values More...
 
static mod (v1, v2)
 returns remainder of v1/v2 which is v1 - iV2 for some integer i More...
 
static pow (v1, v2)
 returns v1 raised to the power of v2 More...
 
static rad (deg)
 returns angle in radians of degrees deg More...
 
static random ([n[, u]])
 returns random real [0,1), integer [1,n] or real [1,u] (with n=1) More...
 
static randomseed (seed)
 sets seed for pseudo-random number generator More...
 
static sin (rad)
 returns sine value of angle rad More...
 
static sqrt (v)
 returns square root of v More...
 
static tan (rad)
 returns tangent value of angle rad More...
 
static clamp (val, a, b)
 
static get_distance (x1, y1, z1, x2, y2, z2)
 
static random_normalized (a)
 
static quadratic_formula (a, b, c)
 
static angle_diff (angle1, angle2)
 
static recenter (value, center, amplitude)
 
static recenter_rad (value, center)
 
static recenter_deg (value, center)
 

Detailed Description

Lua's built in math library.

Member Function Documentation

static math::abs ( v  )
static

returns absolute value of v

static math::acos ( v  )
static

returns arc cosine value of v in radians

static math::angle_diff ( angle1  ,
angle2   
)
static
static math::asin ( v  )
static

returns arc sine value of v in radians

static math::atan ( v  )
static

returns arc tangent value of v in radians

static math::atan2 ( v1  ,
v2   
)
static

returns arc tangent value of v1/v2 in radians

static math::ceil ( v  )
static

returns smallest integer >= v

static math::clamp ( val  ,
,
 
)
static
static math::cos ( rad  )
static

returns cosine value of angle rad

static math::deg ( rad  )
static

returns angle in degrees of radians rad

static math::exp ( v  )
static

returns e^v

static math::floor ( v  )
static

returns largest integer <= v

static math::frexp ( v  )
static

returns mantissa [0.5,1) and exponent values of v

static math::get_distance ( x1  ,
y1  ,
z1  ,
x2  ,
y2  ,
z2   
)
static
static math::ldexp ( v1  ,
v2   
)
static

returns v1*2^v2

static math::log ( v  )
static

returns natural logarithm of v

static math::log10 ( v  )
static

returns logarithm 10 of v

static math::max ( v1  ,
  ... 
)
static

returns maximum in a list of one or more values

static math::min ( v1  ,
  ... 
)
static

returns minimum in a list of one or more values

static math::mod ( v1  ,
v2   
)
static

returns remainder of v1/v2 which is v1 - iV2 for some integer i

static math::pow ( v1  ,
v2   
)
static

returns v1 raised to the power of v2

static math::quadratic_formula ( ,
,
 
)
static
static math::rad ( deg  )
static

returns angle in radians of degrees deg

static math::random ( [n[, u] ]  )
static

returns random real [0,1), integer [1,n] or real [1,u] (with n=1)

static math::random_normalized ( )
static
static math::randomseed ( seed  )
static

sets seed for pseudo-random number generator

static math::recenter ( value  ,
center  ,
amplitude   
)
static
static math::recenter_deg ( value  ,
center   
)
static
static math::recenter_rad ( value  ,
center   
)
static
static math::sin ( rad  )
static

returns sine value of angle rad

static math::sqrt ( v  )
static

returns square root of v

static math::tan ( rad  )
static

returns tangent value of angle rad


The documentation for this class was generated from the following files: