Hacker News new | ask | show | jobs
by 3r3rni9 1530 days ago
Came here to mention this, seeing those high precision decimals -- if you ever need to use their dimensions in any DOM arethmetic, be sure your process converts those to integers and back first (or use a lib like BigNumber, or the new JS BigInt). Many experienced front end devs ignore floating point issues unless they're doing financial math, then wonder why their JavaScript CSS calculations won't work out precicely.
1 comments

In the case of the SVG editor I'd really like something that round-trips to and from SVG that looks nice in a text editor.

In a case like that it should "snap-to-grid" on the last decimal place of the number that's being edited, maybe the grid should even be displayed on the screen. That grid might be rotated or skewed because of coordinate transforms, and there ought to be some way to add another digit worth of fineness if not a factor of 2 or 5.