From 2d47971cd11677ede752786be93ad821ef2d8e87 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 28 Nov 2013 09:39:50 -0500 Subject: Indent --- mathfuncs_asin.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mathfuncs_asin.h b/mathfuncs_asin.h index ce15fe9..3dd9c75 100644 --- a/mathfuncs_asin.h +++ b/mathfuncs_asin.h @@ -181,16 +181,22 @@ namespace vecmathlib { template realvec_t mathfuncs::vml_atan2(realvec_t y, realvec_t x) { + // Algorithm taken from SLEEF 2.80 + realvec_t r = atan2k(fabs(y), x); r = mulsign(r, x); r = ifthen(isinf(x) || x == RV(0.0), - ifthen(isinf(x), RV(M_PI_2) - copysign(RV(M_PI_2), x), RV(M_PI_2)), + ifthen(isinf(x), + RV(M_PI_2) - copysign(RV(M_PI_2), x), + RV(M_PI_2)), r); r = ifthen(isinf(y), - ifthen(isinf(x), RV(M_PI_2) - copysign(RV(M_PI_4), x), RV(M_PI_2)), + ifthen(isinf(x), + RV(M_PI_2) - copysign(RV(M_PI_4), x), + RV(M_PI_2)), r); r = ifthen(y == RV(0.0), -- cgit v1.1