0
我有以下功能,我很接近破解,但無法在obj-c中找到mod函數。我希望有人能幫助解決這個問題。座標計算Objective-C
-(void)estimatePosition{
float lat1 = 50.000;
float lon1 = -1.666;
float d = 500;
float tc = 90;
float lat;
float dlon;
float lon;
lat =asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc));
dlon=atan2(sin(tc)*sin(d)*cos(lat1),cos(d)-sin(lat1)*sin(lat));
lon=mod(lon1-dlon +M_PI,2*M_PI)-M_PI;
}
謝謝排序! – 2010-01-22 06:42:27