Rounding...
Rounding...
(OP)
What is the best way to round using autolisp? I'd like to be able to round to 3 places.
ex) 200.4955 -> 200.496
ex) 200.4955 -> 200.496
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
|
RE: Rounding...
(rtos 200.4955 2 3) which is
(rtos number mode accuracy) mode is optional if your units are set to the desired output (i.e. scientific, decimal, engineering etc.)
RE: Rounding...
If you wante a real number as a result, use 'atof' on the rounded string returned by 'rtos'.
RE: Rounding...