From 21965b7566eec41c85bd8cdf57b7d9bc1a9fd07f Mon Sep 17 00:00:00 2001 From: "Dipl.-Ing. Jonas Stienen" Date: Thu, 7 Dec 2017 15:43:15 +0100 Subject: [PATCH] Fixing bug in angle projection --- src/ITANumericUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ITANumericUtils.cpp b/src/ITANumericUtils.cpp index 9d64799..9919778 100644 --- a/src/ITANumericUtils.cpp +++ b/src/ITANumericUtils.cpp @@ -256,7 +256,7 @@ float anglef_proj_NPI_PI( const float alpha ) float anglef_proj_NPIH_PIH( const float alpha ) { - float alpha_temp = fmodf( alpha, PI_F ); + float alpha_temp = fmodf( alpha + PI_F / 2.0f, PI_F ) - PI_F / 2.0f; if( alpha_temp < -PI_F/2.0f ) alpha_temp += PI_F; return alpha_temp; -- GitLab