We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hey guys, I am new to processing so sorry about my basic question : I want to println a float value with four digits after the point but it only show 0.0 in bottom message box. what should I do?
Answers
https://processing.org/reference/nf_.html
4.0000 4.2500
Keep in mind that nf() returns a String, so you can assign it to a String variable.
Thank You kalkr, But as you see below the tg variable that I am trying to print with 4 digits is actually used in other lines and it can't be a string. it looks processing rounds the value so other equations wont return true value.
nf() doesnt turn a float variable into a string variable (which isnt possible anyways), it simply formats a number the way you want it to look like and returns it as a string.