public sealed class Math
|
E | Represents the natural logarithmic base, specified by the constant, e. |
PI | Represents the ratio of the circumference of a circle to its diameter, specified by the constant, (pi). |
Abs | Overloaded:Abs(decimal value) Returns the absolute value of a Decimal number. |
Abs | Overloaded:Abs(double value) Returns the absolute value of a double-precision floating-point number. |
Abs | Overloaded:Abs(short value) Returns the absolute value of a 16-bit signed integer. |
Abs | Overloaded:Abs(int value) Returns the absolute value of a 32-bit signed integer. |
Abs | Overloaded:Abs(long value) Returns the absolute value of a 64-bit signed integer. |
Abs | Overloaded:Abs(sbyte value) Returns the absolute value of an 8-bit signed integer. |
Abs | Overloaded:Abs(float value) Returns the absolute value of a single-precision floating-point number. |
Acos | Returns the angle whose cosine is the specified number. |
Asin | Returns the angle whose sine is the specified number. |
Atan | Returns the angle whose tangent is the specified number. |
Atan2 | Returns the angle whose tangent is the quotient of two specified numbers. |
Ceiling | Returns the smallest whole number greater than or equal to the specified number. |
Cos | Returns the cosine of the specified angle. |
Cosh | Returns the hyperbolic cosine of the specified angle. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
Exp | Returns e raised to the specified power. |
Floor | Returns the largest whole number less than or equal to the specified number. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
IEEERemainder | Returns the remainder resulting from the division of a specified number by another specified number. |
Log | Overloaded:Log(double d) Returns the natural (base e) logarithm of a specified number. |
Log | Overloaded:Log(double a, double newBase) Returns the logarithm of a specified number in a specified base. |
Log10 | Returns the base 10 logarithm of a specified number. |
Max | Overloaded:Max(byte val1, byte val2) Returns the larger of two 8-bit unsigned integers. |
Max | Overloaded:Max(decimal val1, decimal val2) Returns the larger of two decimal numbers. |
Max | Overloaded:Max(double val1, double val2) Returns the larger of two double-precision floating-point numbers. |
Max | Overloaded:Max(short val1, short val2) Returns the larger of two 16-bit signed integers. |
Max | Overloaded:Max(int val1, int val2) Returns the larger of two 32-bit signed integers. |
Max | Overloaded:Max(long val1, long val2) Returns the larger of two 64-bit signed integers. |
Max | Overloaded:Max(sbyte val1, sbyte val2) Returns the larger of two 8-bit signed integers. |
Max | Overloaded:Max(float val1, float val2) Returns the larger of two single-precision floating-point numbers. |
Max | Overloaded:Max(ushort val1, ushort val2) Returns the larger of two 16-bit unsigned integers. |
Max | Overloaded:Max(uint val1, uint val2) Returns the larger of two 32-bit unsigned integers. |
Max | Overloaded:Max(ulong val1, ulong val2) Returns the larger of two 64-bit unsigned integers. |
Min | Overloaded:Min(byte val1, byte val2) Returns the smaller of two 8-bit unsigned integers. |
Min | Overloaded:Min(decimal val1, decimal val2) Returns the smaller of two decimal numbers. |
Min | Overloaded:Min(double val1, double val2) Returns the smaller of two double-precision floating-point numbers. |
Min | Overloaded:Min(short val1, short val2) Returns the smaller of two 16-bit signed integers. |
Min | Overloaded:Min(int val1, int val2) Returns the smaller of two 32-bit signed integers. |
Min | Overloaded:Min(long val1, long val2) Returns the smaller of two 64-bit signed integers. |
Min | Overloaded:Min(sbyte val1, sbyte val2) Returns the smaller of two 8-bit signed integers. |
Min | Overloaded:Min(float val1, float val2) Returns the smaller of two single-precision floating-point numbers. |
Min | Overloaded:Min(ushort val1, ushort val2) Returns the smaller of two 16-bit unsigned integers. |
Min | Overloaded:Min(uint val1, uint val2) Returns the smaller of two 32-bit unsigned integers. |
Min | Overloaded:Min(ulong val1, ulong val2) Returns the smaller of two 64-bit unsigned integers. |
Pow | Returns a specified number raised to the specified power. |
Round | Overloaded:Round(decimal d) Returns the whole number nearest the specified value. |
Round | Overloaded:Round(double a) Returns the whole number nearest the specified value. |
Round | Overloaded:Round(decimal d, int decimals) Returns the number with the specified precision nearest the specified value. |
Round | Overloaded:Round(double value, int digits) Returns the number with the specified precision nearest the specified value. |
Sign | Overloaded:Sign(decimal value) Returns a value indicating the sign of a decimal number. |
Sign | Overloaded:Sign(double value) Returns a value indicating the sign of a double-precision floating-point number. |
Sign | Overloaded:Sign(short value) Returns a value indicating the sign of a 16-bit signed integer. |
Sign | Overloaded:Sign(int value) Returns a value indicating the sign of a 32-bit signed integer. |
Sign | Overloaded:Sign(long value) Returns a value indicating the sign of a 64-bit signed integer. |
Sign | Overloaded:Sign(sbyte value) Returns a value indicating the sign of an 8-bit signed integer. |
Sign | Overloaded:Sign(float value) Returns a value indicating the sign of a single-precision floating-point number. |
Sin | Returns the sine of the specified angle. |
Sinh | Returns the hyperbolic sine of the specified angle. |
Sqrt | Returns the square root of a specified number. |
Tan | Returns the tangent of the specified angle. |
Tanh | Returns the hyperbolic tangent of the specified angle. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public const double E;
|
public const double PI;
|
value
value
value
Exception Type | Condition |
---|---|
OverflowException | value equals Int16.MinValue. |
value
Exception Type | Condition |
---|---|
OverflowException | value equals Int32.MinValue. |
value
Exception Type | Condition |
---|---|
OverflowException | value equals Int64.MinValue. |
value
Exception Type | Condition |
---|---|
OverflowException | value equals SByte.MinValue. |
value
d
-or-
Double.NaN if d < -1 or d > 1.
d
-or-
Double.NaN if d < -1 or d > 1.
Multiply the return value by 180/(pi) to convert from radians to degrees.
d
-or-
Double.NaN if d equals Double.NaN, -(pi)/2 rounded to double precision (-1.5707963267949) if d equals Double.NegativeInfinity, or (pi)/2 rounded to double precision (1.5707963267949) if d equals Double.PositiveInfinity.
Multiply the return value by 180/(pi) to convert from radians to degrees.
y
x
a
d
value
d
Exp is the inverse of Math.Log.
~Math(); |
d
public virtual int GetHashCode(); |
public Type GetType(); |
x
y
If x - (y Q) is zero, the value +0 is returned if x is positive, or -0 if x is negative.
If y = 0, Double.NaN (Not-A-Number) is returned.
d
Sign of | Returns |
---|---|
Positive | The natural logarithm of ; that is, ln or log |
Zero | Double.PositiveInfinity |
Negative | Double.NaN |
a
newBase
Sign of | Returns |
---|---|
Positive | The logarithm of , in base, ; that is, log . |
Zero | Double.PositiveInfinity |
Negative | Double.NaN |
d
Sign of | Returns |
---|---|
Positive | The base 10 log of ; that is, log . |
Zero | Double.PositiveInfinity |
Negative | Double.NaN |
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
protected object MemberwiseClone(); |
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
val1
val2
x
y
Parameter Values | Returns |
---|---|
or is equal to Double.NaN | Double.NaN. |
is equal to Double.NegativeInfinity | Double.NegativeInfinity if is an odd integer; otherwise, Double.PositiveInfinity . |
is equal to Double.NegativeInfinity | 0. |
is equal to Double.PositiveInfinity | 0 if is equal to Double.NegativeInfinity ; otherwise, Double.PositiveInfinity . |
is equal to Double.PositiveInfinity | Double.PositiveInfinity . |
d
Math.Round(4.4); //Returns 4.0. Math.Round(4.5); //Returns 4.0. Math.Round(4.6); //Returns 5.0.
a
Math.Round(4.4); //Returns 4.0. Math.Round(4.5); //Returns 4.0. Math.Round(4.6); //Returns 5.0.
d
decimals
The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding to nearest, or banker's rounding. If decimals is zero, this kind of rounding is sometimes called rounding toward zero.
Math.Round(3.44, 1); //Returns 3.4. Math.Round(3.45, 1); //Returns 3.4. Math.Round(3.46, 1); //Returns 3.5.
value
digits
The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding to nearest, or banker's rounding. If digits is zero, this kind of rounding is sometimes called rounding toward zero.
Math.Round(3.44, 1); //Returns 3.4. Math.Round(3.45, 1); //Returns 3.4. Math.Round(3.46, 1); //Returns 3.5.
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
Exception Type | Condition |
---|---|
ArithmeticException | value is equal to Double.NaN. |
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
value
Number | Description |
---|---|
-1 | is less than zero. |
0 | is equal to zero. |
1 | is greater than zero. |
Exception Type | Condition |
---|---|
ArithmeticException | value is equal to Single.NaN. |
a
value
d
Value of | Returns |
---|---|
Zero, or positive | The positive square root of . |
Negative | Double.NaN |
a
value
public virtual string ToString(); |