obj-c : iphone programming disabling the round off of a number

Posted by the1nz4ne on Stack Overflow See other posts from Stack Overflow or by the1nz4ne
Published on 2010-05-01T21:20:56Z Indexed on 2010/05/01 21:27 UTC
Read the original article Hit count: 165

Filed under:
|
|
|

hi, i need to show a number to a user : 1.96666777 (timeHour)

moduloformat = [NSString stringWithFormat:@"%0.0f hours ",timeHour];

but it is rounding off the number automaticly. It gives "2" and i want to show "1" i could use a NSrange and take the first number but i wanna know how to deal with this. Thanks!!

© Stack Overflow or respective owner

Related posts about rounding

Related posts about number