The size and connection positions shown for the chosen variant on a Library item's configure page.
How the precision is kept
The numbers come from the server's item data as 64-bit numbers. The page only turns them into text, rounded to 4 decimal places of a millimeter. The same rounding is used to match a selected option to a variant.
Calculations under this policy
2 calculations in 1 source file. The code is read from the released app when this page loads. It is the calculation people run, not a copy kept for this page.
library-configurator.jsShared shell, every app64-bit2 calculationsReviewed
TestsNone found by the review
Size and position text
64-bit
A dimension, port size or port position as text in millimeters.
text = round(x × 10⁴) ÷ 10⁴
Rounds the text only; the variant data is not changed. The product x × 1e4 is itself rounded to 64-bit before Math.round, so a value within one rounding step of a tie can go either way.