Name

Math

Synopsis

This class provides static helper functions for many trigonometric, logarithmic, and other mathematical operations, including methods for rounding numbers, getting absolute values, retrieving the largest whole divisor (Floor()), and determining the remainder (IEEERemainder()). The constants pi and e are provided as fields.

public sealed class Math {
// Public Static Fields
   public const field double E;                                  // =2.71828182845905
   public const field double PI;                                 // =3.14159265358979
                  // Public Static Methods
   public static method decimal Abs(decimal value);  
   public static method double Abs(double value);  
   public static method short Abs(short value);  
   public static method int Abs(int value);  
   public static method long Abs(long value);  
   public static method sbyte Abs(sbyte value);  
   public static method float Abs(float value);  
   public static method double Acos(double d);  
   public static method double Asin(double d);  
   public static method double Atan(double d);  
   public static method double Atan2(double y, double x);  
   public static method double Ceiling(double a);  
   public static method double Cos(double d);  
   public static method double Cosh(double value);  
   public static method double Exp(double d);  
   public static method double Floor(double d);  
   public static method double IEEERemainder(double x, 
        double y);  
   public static method double Log(double d);  
   public static method double Log(double a, double newBase);  
   public static method double Log10(double d);  
   public static method byte Max(byte val1, byte ...

Get C# in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.