|
Lua SPOT v1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectse.krka.kahlua.stdlib.MathLib
public final class MathLib
Field Summary | |
---|---|
static double |
EPS
|
Constructor Summary | |
---|---|
MathLib(int index)
|
Method Summary | |
---|---|
static double |
acos(double arg)
|
static double |
asin(double arg)
|
static double |
atan(double arg)
|
static double |
atan2(double arg1,
double arg2)
|
int |
call(LuaCallFrame callFrame,
int nArguments)
General contract Input: callFrame = the frame that contains all the arguments, and where all the results should be put. nArgs = number of function arguments callFrame.get(i) = an argument (0 <= i < nArgs) |
static double |
exp(double x)
|
static double |
ipow(double base,
int exponent)
|
static boolean |
isNegative(double vDouble)
|
static double |
ln(double x)
|
static double |
pow(double base,
double exponent)
|
static void |
register(LuaState state)
|
static double |
round(double x)
Rounds towards even numbers |
static double |
roundToPrecision(double x,
int precision)
Rounds to keep precision decimals. |
static double |
roundToSignificantNumbers(double x,
int precision)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double EPS
Constructor Detail |
---|
public MathLib(int index)
Method Detail |
---|
public static void register(LuaState state)
public java.lang.String toString()
toString
in class java.lang.Object
public int call(LuaCallFrame callFrame, int nArguments)
JavaFunction
call
in interface JavaFunction
callFrame
- - the current callframe for the functionnArguments
- - number of function arguments
public static boolean isNegative(double vDouble)
public static double round(double x)
x
- public static double roundToPrecision(double x, int precision)
x
- the number to roundprecision
- the precision to round to. A precision of 3 will for instance round 1.65432 to 1.654
public static double roundToSignificantNumbers(double x, int precision)
public static double exp(double x)
public static double ln(double x)
public static double pow(double base, double exponent)
public static double ipow(double base, int exponent)
public static double atan(double arg)
public static double atan2(double arg1, double arg2)
public static double asin(double arg)
public static double acos(double arg)
|
Lua SPOT v1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |