Add "floatRange" function, since the division for dashed lines can result in float values.