i have number:
3.08
and i use this:
NSLog(@"%1.1f", self.test.value);
but console output 3.1 not 3.0 i need output 3.0 pls help...
i have number:
3.08
and i use this:
NSLog(@"%1.1f", self.test.value);
but console output 3.1 not 3.0 i need output 3.0 pls help...
That is because it is rounding up. This might work to force it to round down:
NSLog(@"%1.1f", floor(self.test.value*10f) / 10f);