tags:

views:

21

answers:

1

how to get digits after decimal point from float number in objective c

A: 

OK, this is C-style, but I imagine the process would be the same.

int decimals = (number -((int)number) );

while( decimals > 0.0 )
{
    reportNextNumber( (int)(decimals*10) );
    decimals = (number -((int)number) );
}
maxwellb