/* *** SCRIPT SYMBOL: [Maths] Maths::ArcTan^1 *** */ static FLOAT_RETURN_TYPE Math_ArcTan(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = ::atan(value); RETURN_FLOAT(value); }
/* *** SCRIPT SYMBOL: [Maths] Maths::Sin^1 *** */ static FLOAT_RETURN_TYPE Math_Sin(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = ::sin(value); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_RadiansToDegrees(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = value * (180.0 / M_PI); RETURN_FLOAT(value); }
/* * public native float getTargetHeapUtilization() * * Gets the current ideal heap utilization, represented as a number * between zero and one. */ static void Dalvik_dalvik_system_VMRuntime_getTargetHeapUtilization( const u4* args, JValue* pResult) { UNUSED_PARAMETER(args); RETURN_FLOAT(dvmGetTargetHeapUtilization()); }
/* *** SCRIPT SYMBOL: [Maths] Maths::Sinh^1 *** */ static FLOAT_RETURN_TYPE Math_Sinh(SCRIPT_FLOAT(num)) { INIT_SCRIPT_FLOAT(num); float value = ::sinh(num); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_ArcSin(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = asin(value); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_Tan(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = tan(value); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_ArcCos(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = acos(value); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_DegreesToRadians(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = value * (M_PI / 180.0); RETURN_FLOAT(value); }
/* *** SCRIPT SYMBOL: [Maths] Maths::Cos^1 *** */ static FLOAT_RETURN_TYPE Math_Cos(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); value = ::cos(value); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_Tanh(SCRIPT_FLOAT(num)) { INIT_SCRIPT_FLOAT(num); float value = tanh(num); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_Exp(SCRIPT_FLOAT(num)) { INIT_SCRIPT_FLOAT(num); float value = exp(num); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_Log10(SCRIPT_FLOAT(num)) { INIT_SCRIPT_FLOAT(num); float value = ::log10(num); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_RaiseToPower(SCRIPT_FLOAT(base), SCRIPT_FLOAT(exp)) { INIT_SCRIPT_FLOAT(base); INIT_SCRIPT_FLOAT(exp); float value = ::pow(base, exp); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_ArcTan2(SCRIPT_FLOAT(yval), SCRIPT_FLOAT(xval)) { INIT_SCRIPT_FLOAT(yval); INIT_SCRIPT_FLOAT(xval); float value = atan2(yval, xval); RETURN_FLOAT(value); }
FLOAT_RETURN_TYPE Math_Sqrt(SCRIPT_FLOAT(value)) { INIT_SCRIPT_FLOAT(value); if (value < 0.0) quit("!Sqrt: cannot perform square root of negative number"); value = ::sqrt(value); RETURN_FLOAT(value); }
jfloat fastiva_Dalvik_dalvik_system_VMRuntime_getTargetHeapUtilization(dalvik_system_VMRuntime_p self) { #endif RETURN_FLOAT(dvmGetTargetHeapUtilization()); }
FLOAT_RETURN_TYPE StringToFloat(const char *theString) { float fval = atof(theString); RETURN_FLOAT(fval); }
FLOAT_RETURN_TYPE IntToFloat(int value) { float fval = value; RETURN_FLOAT(fval); }
FLOAT_RETURN_TYPE Math_GetPi() { float pi = M_PI; RETURN_FLOAT(pi); }