oxilean-std 0.1.2

OxiLean standard library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! # Complex - cosh_group Methods
//!
//! This module contains method implementations for `Complex`.
//!
//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)

use super::complex_type::Complex;

impl Complex {
    /// Hyperbolic cosine: cosh(z) = (e^z + e^(-z)) / 2.
    pub fn cosh(self) -> Self {
        let ep = self.exp();
        let em = self.neg().exp();
        ep.add(em).scale(0.5)
    }
}