これは、あるCLLocationから別のCLLocationへの角度(ラジアン単位)を計算する有効な方法ですか?2つのCLLocationsの間の角度を計算する有効な方法は?
-(float)angleFromLocation:(CLLocationCoordinate2D)start toLocation:(CLLocationCoordinate2D)end {
float deltaX = start.latitude - end.latitude;
float deltaY = start.longitude - end.longitude;
float ang = atan2(deltaY, deltaX);
return ang;}
お助言ください!
ご協力いただければ幸いです。
あなたが近づいています。この回答への解決策を見てください - http://stackoverflow.com/questions/6140045/how-to-get-degree-of-poi-from-another-poi – olo