Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General

General

I wrote a macro to round a number to the nearest integer. Is there any automatic method to round to the nearest integer in ANSYS?

    • FAQFAQ
      Participant

      Yes, use NINT(x) where x is the number you want to round to the nearest integer. For example, if your number is 10.9… my_number=10.9 my_new_number=NINT(my_number) my_number will be rounded from 10.9 so that my_new_number = 11