diff src/luan/interp/DivExpr.java @ 46:a443637829c1

remove LuaNumber git-svn-id: https://luan-java.googlecode.com/svn/trunk@47 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 27 Dec 2012 01:48:36 +0000
parents 57054fa43189
children 64ecb7a3aad7
line wrap: on
line diff
--- a/src/luan/interp/DivExpr.java	Thu Dec 27 00:44:58 2012 +0000
+++ b/src/luan/interp/DivExpr.java	Thu Dec 27 01:48:36 2012 +0000
@@ -1,7 +1,6 @@
 package luan.interp;
 
 import luan.Lua;
-import luan.LuaNumber;
 import luan.LuaException;
 import luan.LuaSource;
 
@@ -15,10 +14,10 @@
 	@Override public Object eval(LuaStateImpl lua) throws LuaException {
 		Object o1 = op1.eval(lua);
 		Object o2 = op2.eval(lua);
-		LuaNumber n1 = Lua.toNumber(o1);
-		LuaNumber n2 = Lua.toNumber(o2);
+		Number n1 = Lua.toNumber(o1);
+		Number n2 = Lua.toNumber(o2);
 		if( n1 != null && n2 != null )
-			return LuaNumber.of( n1.value() / n2.value() );
+			return n1.doubleValue() / n2.doubleValue();
 		return arithmetic(lua,"__div",o1,o2);
 	}
 }