I was curious:
// The Processing constants are evaluated as doubles and then cast to floats.
// I am comparing the constants to the mathematical expression on the right for binary equality.
// float PI = (float) Math.PI;
println(PI == PI); // :)
// float HALF_PI = (float) (Math.PI / 2.0);
println(HALF_PI == PI / 2);
// float THIRD_PI = (float)(Math.PI / 3.0);
println(THIRD_PI == PI / 3);
// float QUARTER_PI = (float)(Math.PI / 4.0);
println(QUARTER_PI == PI / 4);
// float TWO_PI = (float) (2.0 * Math.PI);
println(TWO_PI == 2 * PI);
// float TAU = (float) (2.0 * Math.PI);
println(TAU == 2 * PI);
They were all true!
Processing generally works with float values for its sketch-level math.
In some cases, I have used double for higher precision during the intermediate calculation, then cast the final result to float.
Further exploration:
Processing float values: decimal output and IEEE 754 bit patterns
:)