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 double E; 
// =2.71828182845905
   public const double PI;
// =3.14159265358979
                  // Public Static Methods
   public static decimal Abs(decimal value);
   public static double Abs(double value);
   public static short Abs(short value);
   public static int Abs(int value);
   public static long Abs(long value);
   public static sbyte Abs(sbyte value);
   public static float Abs(float value);
   public static double Acos(double d);
   public static double Asin(double d);
   public static double Atan(double d);
   public static double Atan2(double y, double x);
   public static long BigMul(int a, int b);
   public static double Ceiling(double a);
   public static double Cos(double d);
   public static double Cosh(double value);
   public static int DivRem(int a, int b, out int result);
   public static long DivRem(long a, long b, out long result);
   public static double Exp(double d);
   public static double Floor(double d);
   public static double IEEERemainder(double x, double y);
   public static double Log(double d);
   public static double Log(double a, double newBase);
   public static double Log10(double d);
   public static byte Max(byte val1, byte ...

Get C# in a Nutshell, Second Edition 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.