Math.cosh
Math.cosh
Function
Hyperbolic cosine. Returns the hyperbolic cosine of value.
Syntax
Math.cosh(value)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| value | Number | Yes | None | The number involved in the calculation. |
Return value
| Type | Description |
|---|---|
| Int/Float | Returns the hyperbolic cosine of value. An Int is returned for integer results, and a Float for non-integer or non-finite results. |
Example
result = Math.cosh(0) // Output: 1 print result
Notes
- Internally uses Rust f64's cosh operation.