Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local numlua = {}
- local help = math.exp(1)
- local toend = 0
- function numlua.array(...)
- return {...}
- end
- function numlua.exp(array)
- if type(array) == 'table' then
- toend = {}
- for i=1,#array do
- toend[i] = help ^ array[i]
- end
- elseif type(array) == 'number' then
- toend = 0
- toend = help ^ array
- end
- return toend
- end
- function numlua.dot(array1,array2)
- toend = 0
- for i=1,#array1 do
- toend = toend + array1[i] * array2[i]
- end
- return toend
- end
- return numlua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement