Commit 1261a30
committed
Fix additional misalignments due to numerical precision
There are multiple instances where a value that would ideally be exactly
at a half display pixel might instead be one floating-point tick away in
the wrong direction. Here fudge amounts are added so that the rounding
occurs in the desired direction. An analogous situation occurs for
truncation to a whole pixel. The amount of 1e-8 is chosen because it
covers 1e-13 relative error for 100,000 pixels.1 parent f0fec8b commit 1261a30
2 files changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
413 | | - | |
414 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
415 | 419 | | |
416 | 420 | | |
417 | 421 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
593 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
594 | 595 | | |
595 | 596 | | |
596 | 597 | | |
| |||
780 | 781 | | |
781 | 782 | | |
782 | 783 | | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
787 | 793 | | |
788 | 794 | | |
789 | 795 | | |
| |||
0 commit comments