Class RadMath
Provides static mathematical functions and constants.
Inheritance
Inherited Members
Namespace: Telerik.Charting
Assembly: Telerik.WinControls.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 to compare. |
|
System.Double
value2
The second value to compare. |
Returns
|
System.Boolean
True if the values are close; otherwise, false. |
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 to compare. |
|
System.Double
value2
The second value to compare. |
|
System.Double
tolerance
The tolerance value for comparison. |
Returns
|
System.Boolean
True if the values are close within the tolerance; otherwise, false. |
CalculateHorizontalLineIntersectionPoint(Double, Double, Double, Double, Double)
Declaration
public static double CalculateHorizontalLineIntersectionPoint(double x1, double y1, double x2, double y2, double horizontalLineY)
Parameters
|
System.Double
x1
|
|
System.Double
y1
|
|
System.Double
x2
|
|
System.Double
y2
|
|
System.Double
horizontalLineY
|
Returns
|
System.Double
|
CalculateVerticalLineIntersectionPoint(Double, Double, Double, Double, Double)
Declaration
public static double CalculateVerticalLineIntersectionPoint(double x1, double y1, double x2, double y2, double verticalLineX)
Parameters
|
System.Double
x1
|
|
System.Double
y1
|
|
System.Double
x2
|
|
System.Double
y2
|
|
System.Double
verticalLineX
|
Returns
|
System.Double
|
Coerce(Double, Double, Double)
Declaration
public static double Coerce(double value, double min, double max)
Parameters
|
System.Double
value
|
|
System.Double
min
|
|
System.Double
max
|
Returns
|
System.Double
|
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
|
|
RadPoint
center
|
|
System.Double
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
|
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 decimal value to check. |
Returns
|
System.Boolean
True if the value is close to one; otherwise, false. |
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 to check. |
Returns
|
System.Boolean
True if the value is close to one; otherwise, false. |
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 decimal value to check. |
Returns
|
System.Boolean
True if the value is close to zero; otherwise, false. |
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 to check. |
Returns
|
System.Boolean
True if the value is close to zero; otherwise, false. |