My problem was that I was using Float.isNaN()
and Float.MAX_VALUE
in parts of my code where I couldn't do without them.
I got this answer in the Processing forum which worked like a charm.
For MAX_VALUE: http://docs.oracle.com/javase/6/docs/api/constant-values.html#java.lang.Float.MAX_VALUE And see also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity
For NaN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN