atan2pi

Calculates the arc tangent of y / x divided by π, returning a value ranging from -1 to 1. Exceptions:

InvalidOperationExceptionx or y is signaling NaN
InexactExceptionthe result is inexact
UnderflowExceptionthe result is too small to be represented
More...
@IEEECompliant("atan2Pi", 43)
atan2pi
(
D1
D2
)
(
auto const ref D1 y
,
auto const ref D2 x
)
if (
isDecimal!(D1, D2)
)

Detailed Description

Special values

yxatan2pi(y, x)
NaNanyNaN
anyNaNNaN
±0.0-0.0±1.0
±0.0+0.0±0.0
±0.0<0.0±1.0
±0.0>0.0±0.0
±∞-∞±3/4
±∞+∞±1/4
±∞any±1/2
any-∞±1.0
any+∞±0.0

Examples

decimal32 y = 10;
decimal32 x = 0;
assert (atan2pi(y, x) == decimal32("0.5"));

Meta