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?


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





Show Form
No comments yet. Be the first to add a comment!