GLSL's fract: the part of x above its floor, in [0, 1) for negative x too.
fract
x
[0, 1)
double fract(double x) => x - x.floor();