tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
tan.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_COMPLEX_TAN_HPP
5#define TETL_COMPLEX_TAN_HPP
6
7#include <etl/_complex/complex.hpp>
8#include <etl/_complex/cos.hpp>
9#include <etl/_complex/sin.hpp>
10
11namespace etl {
12
13/// \ingroup complex
14template <typename T>
15[[nodiscard]] constexpr auto tan(complex<T> const& z) -> complex<T>
16{
17 return etl::sin(z) / etl::cos(z);
18}
19
20} // namespace etl
21
22#endif // TETL_COMPLEX_TAN_HPP
constexpr auto tan(complex< T > const &z) -> complex< T >
Definition tan.hpp:15
Definition adjacent_find.hpp:9
A complex number.
Definition complex.hpp:20