I was curious:
// The Processing constants are evaluated as double and then cast to float.
// PI = (float)Math.PI;
println(HALF_PI == PI / 2);
// THIRD_PI = (float)(Math.PI / 3.0);
println(THIRD_PI == PI / 3);
// QUARTER_PI = (float)(Math.PI / 4.0);
println(QUARTER_PI == PI / 4);
// TWO_PI = (float)(Math.PI * 2.0);
println(TWO_PI == 2 * PI);
// TAU = (float)(Math.PI * 2.0);
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.
Note:
I added Processing to the text for clarity.
Further exploration:
Processing float values: decimal output and IEEE 754 bit patterns
:)