The Methods Defined by Math : Math Function : Development C# Examples


C# Examples » Development » Math Function »

 

The Methods Defined by Math








Method
Meaning


public static double Abs(double v)
the absolute value.


public static float Abs(float v)
the absolute value.


public static decimal Abs(decimal v)
the absolute value.


public static int Abs(int v)
the absolute value.


public static short Abs(short v)
the absolute value.


public static long Abs(long v)
the absolute value.


public static sbyte Abs(sbyte v)
the absolute value.


public static double Acos(double v)
the arc cosine. v must be between -1 and 1.


public static double Asin(double v)
the arc sine. v must be between -1 and 1.


public static double Atan(double v)
the arc tangent.


public static double Atan2(double y, double x)
the arc tangent of y/x.


public static double Ceiling(double v)
the smallest integer (represented as a floating-point value) not less than v. For example, given 1.02, Ceiling() returns 2.0. Given -1.02, Ceiling() returns -1.


public static double Cos(double v)
the cosine.


public static double Cosh(double v)
the hyperbolic cosine.


public static double Exp(double v)
the natural logarithm base e raised to the v power.


public static double Floor(double v)
the largest integer (represented as a floating-point value) not greater than v. For example, given 1.02, Floor() returns 1.0. Given -1.02, Floor() returns -2.


public static doubleIEEERemainder(double dividend,double divisor)
Returns the remainder of dividend / divisor.


public static double Log(double v)
the natural logarithm.


public static double Log(double v,double base)
Returns the logarithm for v using base base.


public static double Log10(double v)
Returns the base 10 logarithm for v.


public static double Max(double v1, double v2)
Returns the greater of v1 and v2.


public static float Max(float v1, float v2)
Returns the greater of v1 and v2.


public static decimal Max(decimal v1,decimal v2)
Returns the greater of v1 and v2.


public static int Max(int v1, int v2)
Returns the greater of v1 and v2.


public static short Max(short v1, short v2)
Returns the greater of v1 and v2.


public static long Max(long v1, long v2)
Returns the greater of v1 and v2.


public static uint Max(uint v1, uint v2)
Returns the greater of v1 and v2.


public static ushort Max(ushort v1,ushort v2)
Returns the greater of v1 and v2.


public static ulong Max(ulong v1,ulong v2)
Returns the greater of v1 and v2.


public static byte Max(byte v1, byte v2)
Returns the greater of v1 and v2.


public static sbyte Max(sbyte v1, sbyte v2)
Returns the greater of v1 and v2.


public static double Min(double v1,double v2)
Returns the lesser of v1 and v2.


public static float Min(float v1, float v2)
Returns the lesser of v1 and v2.


public static decimal Min(decimal v1,decimal v2)
Returns the lesser of v1 and v2.


public static int Min(int v1, int v2)
Returns the lesser of v1 and v2.


public static short Min(short v1, short v2)
Returns the lesser of v1 and v2.


public static long Min(long v1, long v2)
Returns the lesser of v1 and v2.


public static uint Min(uint v1, uint v2)
Returns the lesser of v1 and v2.


public static ushort Min(ushort v1,ushort v2)
Returns the lesser of v1 and v2.


public static ulong Min(ulong v1, ulong v2)
Returns the lesser of v1 and v2.


public static byte Min(byte v1, byte v2)
Returns the lesser of v1 and v2.


public static sbyte Min(sbyte v1, sbyte v2)
Returns the lesser of v1 and v2.


public static double Pow(double base,double exp)
Returns base raised to the exp power(baseexp).


public static double Round(double v)
Returns v rounded to the nearest whole number.


public static decimal Round(decimal v)
Returns v rounded to the nearest whole number.


public static double Round(double v,int frac)
Returns v rounded to the number of fractional digits specified by frac.


public static decimal Round(decimal v,int frac)
Returns v rounded to the number of fractional digits specified by frac.


public static int Sign(double v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static int Sign(float v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static int Sign(decimal v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static int Sign(int v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static int Sign(short v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static int Sign(long v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static int Sign(sbyte v)
Returns -1 if v is less than zero, 0 if v is zero, and 1 if v is greater than zero.


public static double Sin(double v)
Returns the sine of v.


public static double Sinh(double v)
Returns the hyperbolic sine of v.


public static double Sqrt(double v)
Returns the square root of v.


public static double Tan(double v)
Returns the tangent of v.


public static double Tanh(double v)
Returns the hyperbolic tangent of v.






HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Development
» Math Function