How to get rid of minus sign from signed zero

前端 未结 6 413
心在旅途
心在旅途 2021-01-13 05:19

I am using asin to calculate the angle. The code is as below :

double FindAngle(const double theValue)
{
     return asin(theValue);
}

Find

6条回答
  •  花落未央
    2021-01-13 06:00

    You can do the following:

    double FindAngle(const double theValue)
    {
         return (asin(theValue) + 0.0);
    }
    

    I had the same problem and that worked for me.

提交回复
热议问题