Hallo!

Das gute alte Modulo vielleicht? (wenn ich dich nicht falsch verstanden habe)

2.1 % 1 => 0.1
1.3 % 1 => 0.3
3.0 % 1 => 0.0