tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
cosh.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_COMPLEX_COSH_HPP
4#define TETL_COMPLEX_COSH_HPP
5
6#include <etl/_cmath/cos.hpp>
7#include <etl/_cmath/cosh.hpp>
8#include <etl/_cmath/sin.hpp>
9#include <etl/_cmath/sinh.hpp>
11
12namespace etl {
13
15template <typename T>
16[[nodiscard]] constexpr auto cosh(complex<T> const& z) -> complex<T>
17{
18 auto const x = z.real();
19 auto const y = z.imag();
20 return {cosh(x) * cos(y), sinh(x) * sin(y)};
21}
22
23} // namespace etl
24
25#endif // TETL_COMPLEX_COSH_HPP
constexpr auto sinh(float arg) noexcept -> float
Computes the hyperbolic sine of arg.
Definition sinh.hpp:14
constexpr auto cos(float arg) noexcept -> float
Computes the cosine of arg (measured in radians).
Definition cos.hpp:44
constexpr auto sin(float arg) noexcept -> float
Computes the sine of arg (measured in radians).
Definition sin.hpp:44
constexpr auto cosh(float arg) noexcept -> float
Computes the hyperbolic cosine of arg.
Definition cosh.hpp:16
Definition adjacent_find.hpp:8
A complex number.
Definition complex.hpp:19