Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Como arredondar valores para múltiplos de 5 no AutoLisp?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
618 Views, 2 Replies

Como arredondar valores para múltiplos de 5 no AutoLisp?

Estou desenvolvendo uma rotina do qual encontro, por meio de um cálculo, um valor "X". Preciso arredondar este valor para o maior número múltiplo de 5 mais próximo. Ex: X= 72,23, arredondar para 75.

Tags (1)
2 REPLIES 2
Message 2 of 3
ВeekeeCZ
in reply to: Anonymous

HERE  Lee offers a solution.

Message 3 of 3
Kent1Cooper
in reply to: Anonymous

From 72.23, 70  is the nearest multiple of 5, not 75.  Do you need to always round upward  to the next higher  value?  That can be done, but it is a different calculation.

 

There are many rounding routines on the Forums.  I put "round nearest" into the Search window in the Customization Forum, and got >this<.  Probably some of those are made to always round upward, if that's what you need.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

State of Sustainability Webinar


AutoCAD Inside the Factory