cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
atan2.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_FUNCTIONS_ATAN2_H
4#define pRC_CORE_VALUE_FUNCTIONS_ATAN2_H
5
6#include <cmath>
7
11
12namespace pRC
13{
14 template<IsFloat Y, IsFloat X>
15 static inline constexpr auto atan2(Y const &y, X const &x)
16 {
17 return Float(std::atan2(y(), x()));
18 }
19
20 template<IsInteger Y, IsFloat X>
21 static inline constexpr auto atan2(Y const &y, X const &x)
22 {
23 return atan2(cast<Float<>>(y), x);
24 }
25
26 template<IsFloat Y, IsInteger X>
27 static inline constexpr auto atan2(Y const &y, X const &x)
28 {
29 return atan2(y, cast<Float<>>(x));
30 }
31
32 template<IsInteger Y, IsInteger X>
33 static inline constexpr auto atan2(Y const &y, X const &x)
34 {
35 return atan2(cast<Float<>>(y), cast<Float<>>(x));
36 }
37}
38#endif // pRC_CORE_VALUE_FUNCTIONS_ATAN2_H
const double y
Definition gmock-matchers-containers_test.cc:377
int x
Definition gmock-matchers-containers_test.cc:376
Definition cholesky.hpp:10
Float(Float< 16 >::Fundamental const) -> Float< 16 >
static constexpr auto cast(T const &a)
Definition cast.hpp:11
static constexpr auto atan2(XA &&a, XB &&b)
Definition atan2.hpp:15