use size as a float2 and use fmod instead