in java, the number 0.1 is a double, and 0.1f is a float. doubles are 64 bits, floats are 32 bits. floats are sufficient for nearly all graphics for which processing was intended, so doubles are avoided for the api in order to make things faster and make the ram footprint smaller.
the p5 preprocessor converts 0.1 to 0.1f behind the scenes, because peppering one's code with 'f's is annoying for advanced users, and confusing for learners.
edit: more info...
so to be clear in processing, all of this code is identical:
float a = 1;
float b = 1.0;
float c = 1.0f;
there's no benefit to one over the other. for instance 0 is converted to 0.0f by the java compiler, so it's not as though the type conversion is happening in your code.
proof for the geeky, the javap dump of this code:
Code:
public class floater {
static public void main(String[] args) {
float a = 1;
float b = 1.0f;
}
}
looks like the following. this is raw java bytecode, fconst and fstore refer to loading a floating point number that's a constant (1.0) and then storing it as a local variable to be used.
Code:
: javap -c floater
Compiled from "floater.java"
public class floater extends java.lang.Object{
public floater();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: return
public static void main(java.lang.String[]);
Code:
0: fconst_1
1: fstore_1
2: fconst_1
3: fstore_2
4: return
}
another further annoyance is that between java a c/c++, the syntax is different. for instance, 0.1f is ok for c/c++ but while 1f is ok for java, it's not for c/c++ (at least on the compilers i was using at the time that we were first developing processing).