Mercurial Hosting > luan
comparison src/luan/interp/PowExpr.java @ 44:57054fa43189
implement table lib
git-svn-id: https://luan-java.googlecode.com/svn/trunk@45 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 26 Dec 2012 23:53:25 +0000 |
parents | e3624b7cd603 |
children | a443637829c1 |
comparison
equal
deleted
inserted
replaced
43:80b67b1a653c | 44:57054fa43189 |
---|---|
16 Object o1 = op1.eval(lua); | 16 Object o1 = op1.eval(lua); |
17 Object o2 = op2.eval(lua); | 17 Object o2 = op2.eval(lua); |
18 LuaNumber n1 = Lua.toNumber(o1); | 18 LuaNumber n1 = Lua.toNumber(o1); |
19 LuaNumber n2 = Lua.toNumber(o2); | 19 LuaNumber n2 = Lua.toNumber(o2); |
20 if( n1 != null && n2 != null ) | 20 if( n1 != null && n2 != null ) |
21 return new LuaNumber( Math.pow( n1.value(), n2.value() ) ); | 21 return LuaNumber.of( Math.pow( n1.value(), n2.value() ) ); |
22 return arithmetic(lua,"__pow",o1,o2); | 22 return arithmetic(lua,"__pow",o1,o2); |
23 } | 23 } |
24 } | 24 } |