Fix ruler imprecise graduation display
This fixes issue #19 (closed)
The problem was caused by a rounding error
The floor
function was used instead of round
Thus for example 4.9999 was rounded down to 4 causing a lack of precision
There is also a fix for graduation drawing past the ruler A simple condition to check, when drawing a graduation, if it is past the ruler, fixes the problem
Some other thing were fixed :
- Graduation positions were static, now they move when the trace is moved
- max and min text, as well as graduations, would overlap when the trace went out of sight, now these text are fixed at the top of the display