Class RadMath
Provides static mathematical functions and constants.
Inheritance
Namespace: Telerik.Charting
Assembly: Telerik.Windows.Controls.Chart.dll
Syntax
public static class RadMath : Object
Fields
DegToRadFactor
The factor used to convert degrees to their radians equivalent.
Declaration
public const double DegToRadFactor = 0.017453292519943295
Field Value
System.
|
Epsilon
Smallest unit such that 1.0+DBL_EPSILON != 1.0.
Declaration
public const double Epsilon = 2.2204460492503131E-09
Field Value
System.
|
RadToDegFactor
The factor used to convert radians to their degree equivalent.
Declaration
public const double RadToDegFactor = 57.295779513082323
Field Value
System.
|
Methods
AreClose(Double, Double)
Determines whether the two specified values are close within the order of EPSILON.
Declaration
public static bool AreClose(double value1, double value2)
Parameters
System. The first value. |
System. The second value. |
Returns
System.
|
AreClose(Double, Double, Double)
Determines whether the two specified values are close within the order of tolerance.
Declaration
public static bool AreClose(double value1, double value2, double tolerance)
Parameters
System. The first value. |
System. The second value. |
System. The allowed tolerance. |
Returns
System.
|
GetArcPoint(Double, RadPoint, Double)
Gets the point that lies on the arc segment of the ellipse, described by the center and radius parameters.
Declaration
public static RadPoint GetArcPoint(double angle, RadPoint center, double radius)
Parameters
System. The arc segment angle. |
Rad The center of the ellipse. |
System. The radius. |
Returns
GetPointDistance(Double, Double, Double, Double)
Gets the distance between two points in a plane.
Declaration
public static double GetPointDistance(double x1, double x2, double y1, double y2)
Parameters
System. The x-coordinate of the first point. |
System. The x-coordinate of the second point. |
System. The y-coordinate of the first point. |
System. The y-coordinate of the second point. |
Returns
System.
|
GetPolarCoordinates(RadPoint, RadPoint, out Double, out Double)
Gets the polar coordinates (radius and angle) from the given arcPoint
.
Declaration
public static void GetPolarCoordinates(RadPoint arcPoint, RadPoint center, out double radius, out double angle)
Parameters
Rad The point in cartesian coordinates. |
Rad The center. |
System. The distance from the center. |
System. The angle in degrees. |
Remarks
This is the reverse operation of Get
GetStandardDeviation(IEnumerable<Double>)
Gets the standard deviation of a set of numbers.
Declaration
public static double GetStandardDeviation(IEnumerable<double> values)
Parameters
System.
|
Returns
System.
|
IsOne(Decimal)
Determines whether the specified value is close to 1 within the order of EPSILON.
Declaration
public static bool IsOne(Decimal value)
Parameters
System. The value. |
Returns
System.
|
IsOne(Double)
Determines whether the specified value is close to 1 within the order of EPSILON.
Declaration
public static bool IsOne(double value)
Parameters
System. The value. |
Returns
System.
|
IsZero(Decimal)
Determines whether the specified value is close to 0 within the order of EPSILON.
Declaration
public static bool IsZero(Decimal value)
Parameters
System. The value. |
Returns
System.
|
IsZero(Double)
Determines whether the specified value is close to 0 within the order of EPSILON.
Declaration
public static bool IsZero(double value)
Parameters
System. The value. |
Returns
System.
|