Java Code Examples for org.luaj.vm2.LuaDouble#valueOf()

The following examples show how to use org.luaj.vm2.LuaDouble#valueOf() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MathLib.java    From VideoOS-Android-SDK with GNU General Public License v3.0 5 votes vote down vote up
/** compute power using installed math library, or default if there is no math library installed */
public static LuaValue dpow(double a, double b) {
	return LuaDouble.valueOf( 
			MATHLIB!=null?
			MATHLIB.dpow_lib(a,b):
			dpow_default(a,b) );
}
 
Example 2
Source File: MathLib.java    From XPrivacyLua with GNU General Public License v3.0 5 votes vote down vote up
/** compute power using installed math library, or default if there is no math library installed */
public static LuaValue dpow(double a, double b) {
	return LuaDouble.valueOf( 
			MATHLIB!=null?
			MATHLIB.dpow_lib(a,b):
			dpow_default(a,b) );
}
 
Example 3
Source File: MathLib.java    From HtmlNative with Apache License 2.0 5 votes vote down vote up
/** compute power using installed math library, or default if there is no math library installed */
public static LuaValue dpow(double a, double b) {
	return LuaDouble.valueOf( 
			MATHLIB!=null?
			MATHLIB.dpow_lib(a,b):
			dpow_default(a,b) );
}
 
Example 4
Source File: MathLib.java    From luaj with MIT License 5 votes vote down vote up
/** compute power using installed math library, or default if there is no math library installed */
public static LuaValue dpow(double a, double b) {
	return LuaDouble.valueOf(
			MATHLIB!=null?
			MATHLIB.dpow_lib(a,b):
			dpow_default(a,b) );
}
 
Example 5
Source File: CoerceJavaToLua.java    From VideoOS-Android-SDK with GNU General Public License v3.0 4 votes vote down vote up
public LuaValue coerce(Object javaValue) {
    Number n = (Number) javaValue;
    return LuaDouble.valueOf(n.doubleValue());
}
 
Example 6
Source File: CoerceJavaToLua.java    From XPrivacyLua with GNU General Public License v3.0 4 votes vote down vote up
public LuaValue coerce( Object javaValue ) {
	Number n = (Number) javaValue;
	return LuaDouble.valueOf( n.doubleValue() );
}
 
Example 7
Source File: CoerceJavaToLua.java    From HtmlNative with Apache License 2.0 4 votes vote down vote up
public LuaValue coerce( Object javaValue ) {
	Number n = (Number) javaValue;
	return LuaDouble.valueOf( n.doubleValue() );
}
 
Example 8
Source File: CoerceJavaToLua.java    From luaj with MIT License 4 votes vote down vote up
public LuaValue coerce( Object javaValue ) {
	Number n = (Number) javaValue;
	return LuaDouble.valueOf( n.doubleValue() );
}