I have several floating point values in processing with decimal places beyond 8 digits.
How can I round these values to the tenths before using text() to draw them?
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.
You can format a floating point (
floatordouble)xwith 2 decimal places like this:This’ll give you a
String.For example:
returns the string
"12.35".