Math » atan2() module

Constexpr-friendly alternatives to std::atan2.

Functions

auto atan2(half y, half x) -> half constexpr noexcept
Returns the arc tangent of a half-precision float.
auto atan2(float y, float x) -> float constexpr noexcept
Returns the arc tangent of a float.
auto atan2(double y, double x) -> double constexpr noexcept
Returns the arc tangent of a double.
auto atan2(long double y, long double x) -> long double constexpr noexcept
Returns the arc tangent of a long double.
auto atan2(float128_t y, float128_t x) -> float128_t constexpr noexcept
Returns the arc tangent of a float128_t.
auto atan2(_Float16 y, _Float16 x) -> _Float16 constexpr noexcept
Returns the arc tangent of a _Float16.
template <typename X, typename Y>
auto atan2(Y y, X x) -> auto constexpr noexcept
Returns the arc tangent of two arithmetic values.

Function documentation

half atan2(half y, half x) constexpr noexcept
#include <muu/half.h>

Returns the arc tangent of a half-precision float.

float atan2(float y, float x) constexpr noexcept
#include <muu/math.h>

Returns the arc tangent of a float.

double atan2(double y, double x) constexpr noexcept
#include <muu/math.h>

Returns the arc tangent of a double.

long double atan2(long double y, long double x) constexpr noexcept
#include <muu/math.h>

Returns the arc tangent of a long double.

float128_t atan2(float128_t y, float128_t x) constexpr noexcept
#include <muu/math.h>

Returns the arc tangent of a float128_t.

_Float16 atan2(_Float16 y, _Float16 x) constexpr noexcept
#include <muu/math.h>

Returns the arc tangent of a _Float16.

#include <muu/math.h>
template <typename X, typename Y>
auto atan2(Y y, X x) constexpr noexcept

Returns the arc tangent of two arithmetic values.

Integer arguments are promoted to double.