SyntaxFix
Write A Post
Hire A Developer
Questions
Use Math.Ceiling to round up
Math.Ceiling
Math.Ceiling(0.5); // 1
Use Math.Round to just round
Math.Round
Math.Round(0.5, MidpointRounding.AwayFromZero); // 1
And Math.Floor to round down
Math.Floor
Math.Floor(0.5); // 0