Math.tanh()
Math.tanh(x) → number
Returns the hyperbolic tangent of x.
Returns the hyperbolic tangent of x. The result is in the range -1 to 1.
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | optional | — | A number. |
Returns
number
The hyperbolic tangent of x.
Example
let t = Math.tanh(1); // 0.7615941559557649