1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-26 20:28:49 +08:00

Add Math.abs

This commit is contained in:
Robert Krimen
2013-03-17 22:17:21 -07:00
parent 8486fe2d1c
commit 896c393235
3 changed files with 24 additions and 0 deletions

View File

@@ -7,6 +7,11 @@ import (
// Math
func builtinMath_abs(call FunctionCall) Value {
number := toFloat(call.Argument(0))
return toValue(math.Abs(number))
}
func builtinMath_acos(call FunctionCall) Value {
number := toFloat(call.Argument(0))
return toValue(math.Acos(number))