Strange, I thaught that % (= modulus computation) is only defined for integers. But experimenting shows that it works in Java too for floats and then you can get rounding errors, because not all floats can be expressed exactly in (internal) binary format. What is done looks like: 6.3f-Math.round(6.3f/2.1f)*2.1f mimicing 'real modulus' computation. So I would not use 'modulus' with floats.
permaculture is largely about replacing oil with people. And one tiny ad: