I would like to “round” a Length and output it as a float in inch but with the max precision that a user can setup (0.000000") and not only the selected one.
For exemple :
If I do this : 0.999998.to_l.to_s.to_l.to_f, I would return 0.999998 in all cases and not 1.0 if the model have an other precision than 0.000000.
Or, the sub question is How SketchUp rounds Lengths ?
For example Length#to_s-instance_method format a length as a String using the current units formatting settings for the model. (So if the user’s model is set to feet, this method will return a nicely formatted length in feet.)
You can also query the actual precision and use e.g. like: