rtos 小数精度的问题
(setq fmtval (rtos 17.5 2 2)) 出来的还是17.5 这是什么情况 看看系统变量dimzin。 ll_j 发表于 2015-5-27 15:03 static/image/common/back.gif看看系统变量dimzin。
搞定,非常感谢 搞定!谢谢。 本帖最后由 sfzyr 于 2021-7-25 13:45 编辑
Converting Real Numbers to a String with Linear Units Format
The rtos function converts a real value to a string. The format of the result string can be specified using the arguments of the function, or by the AutoCAD LUNITS and LUPREC system variables then when not provided. The AutoCAD DIMZIN system variable controls how leading and trailing zeros are written to the result string.
The following example code demonstrates the use of rtos and the values returned (assuming the AutoCAD DIMZIN system variable equals 0). Precision (the third argument to rtos) is set to 4 places in the first call and 2 places in the others.
这个是CAD帮助文件中的描述。
参考这个帮助文件:https://help.autodesk.com/view/AMECH_PP/2021/CHS/index.html?guid=GUID-A38E30D4-684E-44FA-A910-E08522876414
谢谢分享。。。
页:
[1]