I am trying to convert a double to radians using the Objective c function toRadians like this:
double oldLat = toRadians(oldLocation.coordinate.latitude);
but I keep getting a compiler warning and error or implicit declaration of toRadians and toDegrees
I included #import <math.h>
but that didn't solve the problem for some reason.
any help would be greatly appreciated.
There is no toRadians in the Foundation classes. You can just convert it manually
degrees * M_PI / 180.0
Foundation imports math.h so you'll have M_PI otherwise you'll have to
#include <math.h>
try this coding:- ( radian to degree)