I am using asin to calculate the angle. The code is as below :
double FindAngle(const double theValue) { return asin(theValue); }
Find
You can use the following method.
value = Float.compare(value, -0.0f) == 0 ? 0.0f : value ;