comparison core/src/luan/modules/Math.luan @ 503:92c3d22745b8

make _ENV optional
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 20 May 2015 23:24:46 -0600
parents 410e59ebad7d
children fda38db30e65
comparison
equal deleted inserted replaced
502:d3183a330ff5 503:92c3d22745b8
1 java() 1 java()
2 local MathLuan = require "java:luan.modules.MathLuan" 2 local MathLuan = require "java:luan.modules.MathLuan"
3 local JavaMath = require "java:java.lang.Math" 3 local JavaMath = require "java:java.lang.Math"
4 local Integer = require "java:java.lang.Integer" 4 local Integer = require "java:java.lang.Integer"
5 5
6 abs = MathLuan.abs 6 local M = {}
7 acos = MathLuan.acos 7
8 asin = MathLuan.asin 8 M.abs = MathLuan.abs
9 atan = MathLuan.atan 9 M.acos = MathLuan.acos
10 atan2 = MathLuan.atan2 10 M.asin = MathLuan.asin
11 ceil = MathLuan.ceil 11 M.atan = MathLuan.atan
12 cos = MathLuan.cos 12 M.atan2 = MathLuan.atan2
13 cosh = MathLuan.cosh 13 M.ceil = MathLuan.ceil
14 deg = MathLuan.deg 14 M.cos = MathLuan.cos
15 exp = MathLuan.exp 15 M.cosh = MathLuan.cosh
16 floor = MathLuan.floor 16 M.deg = MathLuan.deg
17 log = MathLuan.log 17 M.exp = MathLuan.exp
18 min = MathLuan.min 18 M.floor = MathLuan.floor
19 min_integer = Integer.MIN_VALUE 19 M.log = MathLuan.log
20 max = MathLuan.max 20 M.min = MathLuan.min
21 max_integer = Integer.MAX_VALUE 21 M.min_integer = Integer.MIN_VALUE
22 modf = MathLuan.modf 22 M.max = MathLuan.max
23 pi = JavaMath.PI 23 M.max_integer = Integer.MAX_VALUE
24 pow = MathLuan.pow 24 M.modf = MathLuan.modf
25 rad = MathLuan.rad 25 M.pi = JavaMath.PI
26 random = MathLuan.random 26 M.pow = MathLuan.pow
27 sin = MathLuan.sin 27 M.rad = MathLuan.rad
28 sinh = MathLuan.sinh 28 M.random = MathLuan.random
29 sqrt = MathLuan.sqrt 29 M.sin = MathLuan.sin
30 tan = MathLuan.tan 30 M.sinh = MathLuan.sinh
31 tanh = MathLuan.tanh 31 M.sqrt = MathLuan.sqrt
32 to_string = MathLuan.to_string 32 M.tan = MathLuan.tan
33 M.tanh = MathLuan.tanh
34 M.to_string = MathLuan.to_string
35
36 return M