I am using asin to calculate the angle. The code is as below :
double FindAngle(const double theValue) { return asin(theValue); }
Find
If you just want to convert -0 to 0 and leave other untouched, just do a comparison.
double FindAngle(double value) { double res = asin(value); if (res == 0.0) res = 0.0; return res; }