The modulo % does not work on Floats, use fmod()
https://www.php.net/manual/en/function.fmod.php
php > echo (1.1 % 1);
0
php > echo fmod(1.1, 1);
0.1
Could be a discussion on if it should, but at least at the moment it doesn't.
https://en.wikipedia.org/wiki/Modulo
has a list of languages that do/don't support modulo on floats