O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required