AutoPlay Media Studio 9

How do I...?

How do I...?

Previous topic Next topic  

How do I...?

Previous topic Next topic  

AnswerList of Questions

Round a Number Up or Down

If you want all fractions to round up (e.g. 2.1 -> 3.0, 2.5 -> 3.0) then use Math.Ceil. (See Round a number up.)

If you want all fractions to round down (e.g. 2.1 -> 2.0, 2.5 -> 2.0) then use Math.Floor. (See Round a number down.)

If you want anything equal to or above ".5" to round up, and anything below ".5" to round down (e.g. 2.1 -> 2.0, 2.5 -> 3.0), use the following action:

n = 2.5;

rounded = Math.Round(n);


Learn More: Indigo Rose Software - AutoPlay Media Studio - Buy Now - Contact Us