0
我有兩個位置的經度和緯度。找到兩個位置之間的夾角
我已經找出了這兩個位置之間的距離。
CLLocation *locA = [[CLLocation alloc] initWithLatitude:[player.strLatitude floatValue] longitude:[player.strLongitude floatValue]];
CLLocation *locB = [[CLLocation alloc] initWithLatitude:app.lat longitude:app.lag];
CLLocationDistance distance = [locB distanceFromLocation:locA];
NSLog(@"Distance%f",distance);
[locA release]; [locB release];
現在我想找出這兩個位置之間的角度。
在中心有一個用戶位置,我想以角度展示該Cicle中的其他用戶位置。
感謝您的幫助。
你只是在尋找atan2f函數表示? –
對不起,我不知道atan2f函數。你能提供一些鏈接嗎? – Impossible
你忽略了小學數學課程......? – holex