I am trying to take a reading off a sensor and display it as a percentage. [some value] will always be between 0 and 1.
Here is my code:
NSNumber *reading = [some value];
reading = [reading floatValue] * 100;
However, I get "Assigning to NSNumber *_strong from incompatible type float"
I am new to working NSNumber objects and struggle to understand how to display my sensor reading as a percentage for the user. Ex: 75%
Thanks for any help
float
s ordouble
s and only box them up at the point when I need them boxed. – Scheld