LDraw.org Discussion Forums

Full Version: Official precision?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does the LDR/DAT file format have an official level of precision? To how many decimal places do we store numerical values in files?
(2021-05-27, 17:13)Michael Horvath Wrote: [ -> ]Does the LDR/DAT file format have an official level of precision? To how many decimal places do we store numerical values in files?

In file format spec, no.

In the Official Library spec, yes:
https://www.ldraw.org/article/512.html#precision
Note: This is only for files in the official library. While the file format is silent and the official library spec could be considered the de facto "standard" in most use cases, maximum precision is ultimately dependent on the data type that the LDraw editor in use uses to store the value listed.
(2021-05-27, 17:13)Michael Horvath Wrote: [ -> ]Does the LDR/DAT file format have an official level of precision? To how many decimal places do we store numerical values in files?

I've been told that 2 points of precision is enough for most things.
(2021-06-05, 1:51)Matthew Morrison Wrote: [ -> ]I've been told that 2 points of precision is enough for most things.

I would say 3 points best for rotation matrices in model files.
(2021-06-05, 2:52)Orion Pobursky Wrote: [ -> ]I would say 3 points best for rotation matrices in model files.

I have been using 6 points for everything to be safe.