Unable to generate proper float value in Processing

At least 1 of the variables i or n needs to be of datatype float for the operator / to evaluate its operands as a float value. :face_with_monocle:

Alternatively you can temporarily upcast 1 of the variables to float:
float k = kMax * sqrt( (float) i / n );

5 Likes