-
Notifications
You must be signed in to change notification settings - Fork 1
tannus.math.TMath
DavisDevelopment edited this page Dec 30, 2014
·
2 revisions
A set of numerical utility functions, most of which are
inline
d to minimize run-time function-calls when number-crunching.
Highest integer-value allowed in the ECMAScript spec
Lowest integer-value allowed in the ECMAScript spec
Converts from degrees to radians
Converts from radians to degrees
Returns the greater of
a
andb
(if (a > b) a else b
)
Returns the lesser of
a
andb
(if (a < b) a else b
)
Returns the average of all
nums
if
value
<min
, returnsmin
ifvalue
>max
, returnsmax
if
num
>0
, returns1
ifnum
<0
, returns-1
ifnum
==0
, returns0