|
Engine 0.0.6
Game engine in lua
|

Functions | |
| local function | abs (value) |
| abs module | |
| local function | clamp (value, value_min, value_max) |
| clamp | |
| local function | clamp2 (value, value_min, value_max) |
| clamp | |
| local function | cycle (passed, duration) |
| periodic cycle | |
| local function | dir (value, alpha) |
| direction | |
| local function | dis (x1, y1, x2, y2) |
| euclidean distance | |
| local function | dis2 (x1, y1, x2, y2) |
| quadratic distance | |
| local function | lerp (a, b, alpha) |
| linear interpolation | |
| local function | map (value, in_min, in_max, out_min, out_max) |
| re-maps | |
| local function | max (...) |
| maximum | |
| local function | min (...) |
| minimum | |
| local function | saw (value) |
| sawtooth | |
| local function abs | ( | value | ) |
abs module
| [in] | value |
| local function clamp | ( | value | , |
| value_min | , | ||
| value_max | ) |
clamp
| [in] | value | The value to clamstd.math. |
| [in] | value_min | The minimum value that value can be clamped to. |
| [in] | value_max | The maximum value that value can be clamped to. |
| local function clamp2 | ( | value | , |
| value_min | , | ||
| value_max | ) |
clamp
| [in] | value | The value to clamstd.math. |
| [in] | value_min | The minimum value that value can be clamped to. |
| [in] | value_max | The maximum value that value can be clamped to. |
| local function cycle | ( | passed | , |
| duration | ) |
periodic cycle
| [in] | passed | |
| [in] | duration |
| 0 | start of period |
| 0.5 | middle of period |
| 1 | end of period |
| local function dir | ( | value | , |
| alpha | ) |
direction
| [in] | value | |
| [in] | alpha | default=0 |
| -1 | less than alpha |
| 0 | when in alpha |
| 1 | greater than alpha |
| local function dis | ( | x1 | , |
| y1 | , | ||
| x2 | , | ||
| y2 | ) |
euclidean distance
| [in] | x1 | The x coordinate of the first point. |
| [in] | y1 | The y coordinate of the first point. |
| [in] | x2 | The x coordinate of the second point. |
| [in] | y2 | The y coordinate of the second point. |
| local function dis2 | ( | x1 | , |
| y1 | , | ||
| x2 | , | ||
| y2 | ) |
quadratic distance
| [in] | x1 | The x coordinate of the first point. |
| [in] | y1 | The y coordinate of the first point. |
| [in] | x2 | The x coordinate of the second point. |
| [in] | y2 | The y coordinate of the second point. |
| local function lerp | ( | a | , |
| b | , | ||
| alpha | ) |
linear interpolation
| [in] | a | The starting value |
| [in] | b | The ending value |
| [in] | alpha | The interpolation parameter, typically in the range [0, 1]. |
| local function map | ( | value | , |
| in_min | , | ||
| in_max | , | ||
| out_min | , | ||
| out_max | ) |
re-maps
| [in] | value | The value to be mapped from the input range to the output range. |
| [in] | in_min | The minimum value of the input range. |
| [in] | in_max | The maximum value of the input range. |
| [in] | out_min | The minimum value of the output range. |
| [in] | out_max | The maximum value of the output range. |
| local function max | ( | ... | ) |
maximum
| local function min | ( | ... | ) |
minimum
| local function saw | ( | value | ) |
sawtooth