objective c - how can i convert NSNumber to CLLocationDistance? -


i have convert nsnumber cllocationdistance comparing them. there formatter that? searched @ internet not find.

cllocationdistance double. need this:

nsnumber *number = ... // number cllocationdistance distance = ... // distance  if (distance == [number doublevalue]) {     // equal } 

keep in mind comparing 2 double values equality can appear fail due inexactness of double values.

if (abs(distance - [number doublevalue]) <= dbl_epsilon) {     // equal } 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -