It might be duplicate. But what my problem is i added the CGPointUtils.c/.h into my project. I got the error in the .h file. error is "_radiansToDegree" referenced from
like CGRect referenced from
error message.
I checked the code everything in it is correct, CGFloat data types it returns radiansToDegree(rads). This is where i got the error.
code:
CGFloat angleBetweenPoints(CGPoint first, CGPoint second) {
CGFloat height = second.y - first.y;
CGFloat width = first.x - second.x;
CGFloat rads = atan(height/width);
return radiansToDegrees(rads);
In the last line, where the error is? Could any one give me a solution for that. Thanks
radiansToDegrees isn't in math.h.
Probably the simplest solution is to write one, (it's just a multiply by 180/M_PI).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.