Category talk:Wren-math: Difference between revisions
Bug fixes, restoration of static Math.min/max methods and addition of Math.atan.
(→Source code: Removed a constant which is now in the core library.) |
(Bug fixes, restoration of static Math.min/max methods and addition of Math.atan.) |
||
Line 14:
// Hyperbolic trig functions.
static sinh(x) { (x.exp
static cosh(x) { (x.exp
static tanh(x) { sinh(x)/cosh(x) } // tangent
Line 82:
var sum = p[0]
for (i in 0..7) sum = sum + p[i+1]/(x + i)
return 2.sqrt * Num.pi.sqrt * t.pow(x-0.5) *
}
// Static alternatives to instance methods in Num class.
// Clearer when both arguments are complex expressions.
static min(x, y) { (x < y) ? x : y }
static max(x, y) { (x > y) ? x : y }
static atan(x, y) { x.atan(y) }
}
|