Languages
[Edit]
EN

C# / .NET - Math.Ceiling() method example

0 points
Created by:
Pearl-Hurley
559

The Math.Ceiling() function returns an integer value that is greater than or equal to the argument - the result of round-up operation. 


1. Documentation

Edit
Syntax
Parametersnumber - decimal or double value (primitive value).
Result

Rounded up number value (primitive value).

If input number value is equal to NaN it returns NaN.

If input  number value is equal to -Infinity it returns -Infinity.

If input  number value is equal to +Infinity it returns +Infinity.

DescriptionCeiling is a static method that takes only one parameter and returns a rounded-up value.

2. Rounding with precision up-to n places example

Edit

References

Edit
  1. Floor and ceiling functions - Wikipedia

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

C# / .NET - Math object

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join