19 lines
813 B
Plaintext
19 lines
813 B
Plaintext
var cycles = {}
|
|
var Math_obj = Math
|
|
|
|
cycles.arc_cosine = function(x) { return Math_obj.acos(x) / (2 * pi) }
|
|
cycles.arc_sine = function(x) { return Math_obj.asin(x) / (2 * pi) }
|
|
cycles.arc_tangent = function(x) { return Math_obj.atan(x) / (2 * pi) }
|
|
cycles.cosine = function(x) { return Math_obj.cos(x * 2 * pi) }
|
|
cycles.e = Math_obj.E
|
|
cycles.ln = function(x) { return Math_obj.log(x) }
|
|
cycles.log = function(x) { return Math_obj.log10(x) }
|
|
cycles.log2 = function(x) { return Math_obj.log2(x) }
|
|
cycles.power = function(x, y) { return Math_obj.pow(x, y) }
|
|
cycles.root = function(x, y) { return Math_obj.pow(x, 1 / y) }
|
|
cycles.sine = function(x) { return Math_obj.sin(x * 2 * pi) }
|
|
cycles.sqrt = function(x) { return Math_obj.sqrt(x) }
|
|
cycles.tangent = function(x) { return Math_obj.tan(x * 2 * pi) }
|
|
|
|
return cycles
|