js_sys::Math

Function tanh

Source
pub fn tanh(x: f64) -> f64
Expand description

The Math.tanh() function returns the hyperbolic tangent of a number, that is tanh x = sinh x / cosh x = (e^x - e^-x)/(e^x + e^-x) = (e^2x - 1)/(e^2x + 1)

MDN documentation