float をメソッドに渡していますが、すべての小数が表示されません。なぜこれが起こっているのか分かりません。
次に例を示します。
[[LocationApiCliente sharedInstance] nearPlacesUsingLatitude:-58.3645248331830402 andLongitude:-34.6030467894227982];
それで:
- (BOOL)nearPlacesUsingLatitude:(double)latitude andLongitude:(double) longitude {
NSString *urlWithCoords = [NSString stringWithFormat:@"%@&lat=%f&long=%f", CountriesPath, latitude, longitude];
urlWithCoords を印刷すると、次のようになります。
format=json&lat=-58.364525&long=-34.603047
これ以上。出力端子から得ているもの:
(lldb) p -3.13419834918349f
(float) $4 = -3.1342
(lldb) p -3.13419834918349
(double) $5 = -3.1342
何か案は?