In a similar way that modulo generates a sawtooth wave. It doesn\'t have to be continuous.
here is what i mean:
int m = 10;
int x = 0;
int i
Here is a periodic function that looks like a distant sine approximation; essentially it's a Sinuating paraboloid, using X squared:
function xs ( xx : float ): float{
var xd =Mathf.Abs((Mathf.Abs(xx) % 2.4) - 1.2);
if ( Mathf.Abs(Mathf.Abs(xx) % 4.8) > 2.4){
xd=(-xd*xd)+2.88;
}else{
xd = xd*xd;
}
return xd;
}