MrFrankel / ruler

HTML5 Canvas ruler for authoring tools
http://mrfrankel.github.io/ruler/
221 stars 56 forks source link

The problem of precision loss when calculating guide line position #18

Open bigfacewo opened 4 years ago

bigfacewo commented 4 years ago

After setting Scala to two decimal places, and then restoring it back, the location of guide line has changed. For example, add a line whose position is 700, and then set scale as 0.66, 0.67, 0.68, 0.69, and 1. Then it is found that the original position of the line at 700 is 698. How can I solve this problem?