5.1. System.Math class
The System.Math class provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions. Beside the constants, there is one that specifies the natural logarithmic base – E – and one that specifies the ratio of the circumference of a circle to its diameter – PI.
The following are the common mathematical functions implemented in the Math class:
Abs() Returns the absolute value of a specified number. There are overloaded methods for Decimal, Double, Short, Integer, Long, SByte, and Single arguments.
Ceiling(Double) Returns the smallest whole number that is greater than or equal to the specified number. The rounding performed by this method is called rounding towards positive infinity. ...
Get A Programmer's Guide to .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.