Logarithms & Trigonometry
Last updated
Logarithms and trigonometric functions. Trig comes in degree and radian variants.
.log() → numberBase-10 logarithm.
.ln() → numberNatural (base-e) logarithm.
log (100).log() // 2
log (100).ln() // 4.605170185988092.sin()
Sine (input in degrees).
.cos()
Cosine (input in degrees).
.tan()
Tangent (input in degrees).
.asin()
Arcsine (result in degrees).
.acos()
Arccosine (result in degrees).
.atan()
Arctangent (result in degrees).
log (30).sin() // 0.5
log (180).cos() // -1.radSin()
Sine (input in radians).
.radCos()
Cosine (input in radians).
.radTan()
Tangent (input in radians).
Convert between the two with the built-in functions
degtorad(d)andradtodeg(r). The full set of mathematical functions and constants lives in themathpackage.
Last updated