Class RadMath
Provides static mathematical functions and constants.
Inheritance
Inherited Members
Namespace: Telerik.Charting
Assembly: Telerik.Windows.Controls.Chart.dll
Syntax
public static class RadMath
Fields
DegToRadFactor
The factor used to convert degrees to their radians equivalent.
Declaration
public const double DegToRadFactor = 0.017453292519943295
Field Value
System.Double
|
Epsilon
Smallest unit such that 1.0+DBL_EPSILON != 1.0.
Declaration
public const double Epsilon = 2.2204460492503131E-09
Field Value
System.Double
|
RadToDegFactor
The factor used to convert radians to their degree equivalent.
Declaration
public const double RadToDegFactor = 57.295779513082323
Field Value
System.Double
|
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.Double
value1
The first value. |
System.Double
value2
The second value. |
Returns
System.Boolean
|
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.Double
value1
The first value. |
System.Double
value2
The second value. |
System.Double
tolerance
The allowed tolerance. |
Returns
System.Boolean
|
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.Double
angle
The arc segment angle. |
RadPoint
center
The center of the ellipse. |
System.Double
radius
The radius. |
Returns
RadPoint
|
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.Double
x1
The x-coordinate of the first point. |
System.Double
x2
The x-coordinate of the second point. |
System.Double
y1
The y-coordinate of the first point. |
System.Double
y2
The y-coordinate of the second point. |
Returns
System.Double
|
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
RadPoint
arcPoint
The point in cartesian coordinates. |
RadPoint
center
The center. |
System.Double
radius
The distance from the center. |
System.Double
angle
The angle in degrees. |
Remarks
This is the reverse operation of GetArcPoint(Double, RadPoint, Double).
GetStandardDeviation(IEnumerable<Double>)
Gets the standard deviation of a set of numbers.
Declaration
public static double GetStandardDeviation(IEnumerable<double> values)
Parameters
System.Collections.Generic.IEnumerable<System.Double>
values
|
Returns
System.Double
|
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.Decimal
value
The value. |
Returns
System.Boolean
|
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.Double
value
The value. |
Returns
System.Boolean
|
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.Decimal
value
The value. |
Returns
System.Boolean
|
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.Double
value
The value. |
Returns
System.Boolean
|