Class MathAssistant
Contains methods for cross-platform math operations.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class MathAssistant : object
Properties
E
Gets the value of e.
Declaration
public static double E { get; }
Property Value
Type | Description |
---|---|
System.Double |
Pi
Gets the value of pi.
Declaration
public static double Pi { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
Abs(Double)
Returns the absolute value of the specified value.
Declaration
public static double Abs(double doubleValue)
Parameters
Type | Name | Description |
---|---|---|
System.Double | doubleValue | The value. |
Returns
Type | Description |
---|---|
System.Double |
Abs(Int32)
Returns the absolute value of the specified value.
Declaration
public static int Abs(int intValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intValue | The value. |
Returns
Type | Description |
---|---|
System.Int32 |
Abs(Int64)
Returns the absolute value of the specified value.
Declaration
public static long Abs(long longValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | longValue | The value. |
Returns
Type | Description |
---|---|
System.Int64 |
Abs(Single)
Returns the absolute value of the specified value.
Declaration
public static float Abs(float floatValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | floatValue | The value. |
Returns
Type | Description |
---|---|
System.Single |
Acos(Double)
Returns the arc cosine of the specified value.
Declaration
public static double Acos(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Asin(Double)
Returns the arc sine of the specified value.
Declaration
public static double Asin(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Atan(Double)
Returns the arc tangent of the specified value.
Declaration
public static double Atan(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Atan2(Double, Double)
Returns the arc arc tangent of the specified values.
Declaration
public static double Atan2(double y, double x)
Parameters
Type | Name | Description |
---|---|---|
System.Double | y | The y value. |
System.Double | x | The x value. |
Returns
Type | Description |
---|---|
System.Double |
Ceil(Double)
Returns the ceiling of the specified value.
Declaration
public static double Ceil(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Cos(Double)
Returns the cosine of the specified value.
Declaration
public static double Cos(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Cosh(Double)
Returns the hyperbolic cosine of the specified value.
Declaration
public static double Cosh(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Exp(Double)
Returns e raised to the power of the specified value.
Declaration
public static double Exp(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Floor(Double)
Returns the floor of the specified value.
Declaration
public static double Floor(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Log(Double)
Returns the natural logarithm of the specified value.
Declaration
public static double Log(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Log10(Double)
Returns the base-10 logarithm of the specified value.
Declaration
public static double Log10(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Max(Double, Double)
Returns the larger of two values.
Declaration
public static double Max(double doubleValue1, double doubleValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Double | doubleValue1 | The first value. |
System.Double | doubleValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Double |
Max(Int32, Int32)
Returns the larger of two values.
Declaration
public static int Max(int intValue1, int intValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intValue1 | The first value. |
System.Int32 | intValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Int32 |
Max(Int64, Int64)
Returns the larger of two values.
Declaration
public static long Max(long longValue1, long longValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | longValue1 | The first value. |
System.Int64 | longValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Int64 |
Max(Single, Single)
Returns the larger of two values.
Declaration
public static float Max(float floatValue1, float floatValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Single | floatValue1 | The first value. |
System.Single | floatValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Single |
Min(Double, Double)
Returns the smaller of two values.
Declaration
public static double Min(double doubleValue1, double doubleValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Double | doubleValue1 | The first value. |
System.Double | doubleValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Double |
Min(Int32, Int32)
Returns the smaller of two values.
Declaration
public static int Min(int intValue1, int intValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | intValue1 | The first value. |
System.Int32 | intValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Int32 |
Min(Int64, Int64)
Returns the smaller of two values.
Declaration
public static long Min(long longValue1, long longValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | longValue1 | The first value. |
System.Int64 | longValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Int64 |
Min(Single, Single)
Returns the smaller of two values.
Declaration
public static float Min(float floatValue1, float floatValue2)
Parameters
Type | Name | Description |
---|---|---|
System.Single | floatValue1 | The first value. |
System.Single | floatValue2 | The second value. |
Returns
Type | Description |
---|---|
System.Single |
Pow(Double, Double)
Returns the result of raising x to the power of y.
Declaration
public static double Pow(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x value. |
System.Double | y | The y value. |
Returns
Type | Description |
---|---|
System.Double |
Round(Double)
Returns to the nearest integer.
Declaration
public static double Round(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Sin(Double)
Returns the sine of the specified value.
Declaration
public static double Sin(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Sinh(Double)
Returns the hyperbolic sine of the specified value.
Declaration
public static double Sinh(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Sqrt(Double)
Returns the square root of the specified value.
Declaration
public static double Sqrt(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Tan(Double)
Returns the tangent of the specified value.
Declaration
public static double Tan(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |
Tanh(Double)
Returns the hyperbolic tangent of the specified value.
Declaration
public static double Tanh(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double |