Mercurial Hosting > luan
comparison core/src/luan/modules/MathLuan.java @ 221:ec016471c6eb
make LuanTable an interface
git-svn-id: https://luan-java.googlecode.com/svn/trunk@222 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 17 Jul 2014 07:49:26 +0000 |
parents | 3dcb0f9bee82 |
children | 0a8e6fdb62f0 |
comparison
equal
deleted
inserted
replaced
220:61afe2a1ce96 | 221:ec016471c6eb |
---|---|
1 package luan.modules; | 1 package luan.modules; |
2 | 2 |
3 import luan.Luan; | |
3 import luan.LuanState; | 4 import luan.LuanState; |
4 import luan.LuanTable; | 5 import luan.LuanTable; |
5 import luan.LuanFunction; | 6 import luan.LuanFunction; |
6 import luan.LuanJavaFunction; | 7 import luan.LuanJavaFunction; |
7 import luan.LuanException; | 8 import luan.LuanException; |
9 | 10 |
10 public final class MathLuan { | 11 public final class MathLuan { |
11 | 12 |
12 public static final LuanFunction LOADER = new LuanFunction() { | 13 public static final LuanFunction LOADER = new LuanFunction() { |
13 @Override public Object call(LuanState luan,Object[] args) { | 14 @Override public Object call(LuanState luan,Object[] args) { |
14 LuanTable module = new LuanTable(); | 15 LuanTable module = Luan.newTable(); |
15 try { | 16 try { |
16 add( module, "abs", Double.TYPE ); | 17 add( module, "abs", Double.TYPE ); |
17 add( module, "acos", Double.TYPE ); | 18 add( module, "acos", Double.TYPE ); |
18 add( module, "asin", Double.TYPE ); | 19 add( module, "asin", Double.TYPE ); |
19 add( module, "atan", Double.TYPE ); | 20 add( module, "atan", Double.TYPE ); |