Mercurial Hosting > luan
comparison src/luan/interp/DivExpr.java @ 37:8a57ebfdfd78
add JavaLib
git-svn-id: https://luan-java.googlecode.com/svn/trunk@38 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 20 Dec 2012 02:36:07 +0000 |
parents | e51906de0f11 |
children | e3624b7cd603 |
comparison
equal
deleted
inserted
replaced
36:2a35154aec14 | 37:8a57ebfdfd78 |
---|---|
16 Object o2 = op2.eval(lua); | 16 Object o2 = op2.eval(lua); |
17 LuaNumber n1 = Lua.toNumber(o1); | 17 LuaNumber n1 = Lua.toNumber(o1); |
18 LuaNumber n2 = Lua.toNumber(o2); | 18 LuaNumber n2 = Lua.toNumber(o2); |
19 if( n1 != null && n2 != null ) | 19 if( n1 != null && n2 != null ) |
20 return new LuaNumber( n1.value() / n2.value() ); | 20 return new LuaNumber( n1.value() / n2.value() ); |
21 return arithmetic(lua,"__div",o1,o2); | 21 return lua.arithmetic("__div",o1,o2); |
22 } | 22 } |
23 } | 23 } |