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(decimalvalue
); public static double Abs(doublevalue
); public static short Abs(shortvalue
); public static int Abs(intvalue
); public static long Abs(longvalue
); public static sbyte Abs(sbytevalue
); public static float Abs(floatvalue
); public static double Acos(doubled
); public static double Asin(doubled
); public static double Atan(doubled
); public static double Atan2(doubley
, doublex
); public static long BigMul(inta
, intb
); public static double Ceiling(doublea
); public static double Cos(doubled
); public static double Cosh(doublevalue
); public static int DivRem(inta
, intb
, out intresult
); public static long DivRem(longa
, longb
, out longresult
); public static double Exp(doubled
); public static double Floor(doubled
); public static double IEEERemainder(doublex
, doubley
); public static double Log(doubled
); public static double Log(doublea
, doublenewBase
); public static double Log10(doubled
); public static byte Max(byteval1
, 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.