cMHN 1.1
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
arg.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_ARG_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_ARG_H
5
8
9namespace pRC
10{
11 template<class T, If<IsInvocable<Atan2, T, T>> = 0>
12 static inline constexpr auto arg(Complex<T> const &a)
13 {
14 return atan2(a.imag(), a.real());
15 }
16}
17#endif // pRC_CORE_COMPLEX_FUNCTIONS_ARG_H
Definition complex.hpp:26
constexpr decltype(auto) real() &&
Definition complex.hpp:125
constexpr decltype(auto) imag() &&
Definition complex.hpp:145
Definition cholesky.hpp:18
static constexpr auto arg(Complex< T > const &a)
Definition arg.hpp:12
static constexpr auto atan2(XA &&a, XB &&b)
Definition atan2.hpp:15