question

Amy M3 avatar image
0 Likes"
Amy M3 asked Amy M3 commented

rounding up

Is there a way to always round a number up if there are any decimals? Example, 7.4 I want a result of 8.


FlexSim 23.0.5
mathrounding
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered Amy M3 commented

Math.ceil() will round up to the nearest integer and Math.floor() will round down to the nearest integer.

Math.round() can be used to round to the nearest integer or the nearest decimal place if you specify a precision.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Amy M3 avatar image Amy M3 commented ·

perfect, thank you!

0 Likes 0 ·