I have the following double value: 0.000900137869045636
which I would like to convert to a NSString
.
I've tried the following code, but no matter what, it rounds the value to this: 0.000900138
[NSString stringWithFormat:@"%.20lf", [currentLocation coordinate].latitude];
What should I do to keep the double number as it is?
Thank you.
Create an NSNumber using
NSNumber *myDoubleNumber = [NSNumber numberWithDouble:myDouble];
Then call
[myDoubleNumber stringValue];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With