I am developing code using Processing 3.5.4 on PC, exporting to Linux, copying exported files from armv6hf to Rpi Buster on Rpi 2 hardware. Since nf() returns a string, or at least I thought it did, I’m curious why the following code is not displaying 35678
float x = 35678.234;
text( nf(x,0,0), 200, 200 );
The program displays 35678.234. The only way I can display a whole number is by casting the float into an int variable.
I checked documentation page more closely and it states “The values for the digits and right parameters should always be positive integers.” So I’m guessing that means this function isn’t supposed to be used to create a whole number the way I’ve been attempting it. I’m assuming that means they don’t support negative numbers either, even though it works.