Ensure only floating-point division is used

While this is not currently necessary as we're careful to work with
floats through most of our code, it's a good idea nonetheless, as
we might not always remember to be careful in the future.
Ensure dots don't overlap

New algorithm for dot spacing will make sure that dots appear at
the start and end of all line segments, and will be evenly spaced
throughout any given line segment (with a spacing as close to the
specified spacing as possible). The result looks pretty good.