How to round an float value and convert it into NSInteger value in Iphone sdk?

Posted by monish on Stack Overflow See other posts from Stack Overflow or by monish
Published on 2010-05-19T11:55:32Z Indexed on 2010/05/19 12:00 UTC
Read the original article Hit count: 204

Filed under:

Hi Guys,

I need to round a float value and convert it into NSInteger value.

for example:

       float f = 90.909088;

       I want the result as 91.

Can any one help to get rid of this.

Anyone's help will be much appreciated.

© Stack Overflow or respective owner

Related posts about objective-c