I have a value from 0 to 200 where 0 is better quality and 200 the worst quality.
How could I convert (In obj-c/cocoa framework) that to an integer from 0-5 being 5 best?.
For example 200 would be 0 and 0 would be 5.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hopefully the rounding works here:
You may get the same results by just doing
but it depends on your compiler’s math settings.