Tweak atan2

This commit is contained in:
Charles Schlosser
2023-01-26 17:38:21 +00:00
parent 6fc9de7d93
commit 6d9f662a70
5 changed files with 73 additions and 58 deletions

View File

@@ -1734,6 +1734,12 @@ T atan(const T &x) {
return static_cast<T>(atan(x));
}
template <typename T, std::enable_if_t<!NumTraits<T>::IsComplex, int> = 0>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T atan2(const T& y, const T& x) {
EIGEN_USING_STD(atan2);
return static_cast<T>(atan2(y, x));
}
template<typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
T atanh(const T &x) {