Class
RadMath

Provides static mathematical functions and constants.

Definition

Namespace:Telerik.Charting

Assembly:Telerik.WinControls.dll

Syntax:

cs-api-definition
public static class RadMath

Inheritance: objectRadMath

Fields

DegToRadFactor

The factor used to convert degrees to their radians equivalent.

Declaration

cs-api-definition
public const double DegToRadFactor = 0.017453292519943295

Field Value

double

Epsilon

Smallest unit such that 1.0+DBL_EPSILON != 1.0.

Declaration

cs-api-definition
public const double Epsilon = 2.220446049250313E-09

Field Value

double

RadToDegFactor

The factor used to convert radians to their degree equivalent.

Declaration

cs-api-definition
public const double RadToDegFactor = 57.29577951308232

Field Value

double

Methods

AreClose(double, double)

Determines whether the two specified values are close within the order of EPSILON.

Declaration

cs-api-definition
public static bool AreClose(double value1, double value2)

Parameters

value1

double

The first value to compare.

value2

double

The second value to compare.

Returns

bool

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

cs-api-definition
public static bool AreClose(double value1, double value2, double tolerance)

Parameters

value1

double

The first value to compare.

value2

double

The second value to compare.

tolerance

double

The tolerance value for comparison.

Returns

bool

True if the values are close within the tolerance; otherwise, false.

CalculateHorizontalLineIntersectionPoint(double, double, double, double, double)

Declaration

cs-api-definition
public static double CalculateHorizontalLineIntersectionPoint(double x1, double y1, double x2, double y2, double horizontalLineY)

Parameters

x1

double

y1

double

x2

double

y2

double

horizontalLineY

double

Returns

double

CalculateVerticalLineIntersectionPoint(double, double, double, double, double)

Declaration

cs-api-definition
public static double CalculateVerticalLineIntersectionPoint(double x1, double y1, double x2, double y2, double verticalLineX)

Parameters

x1

double

y1

double

x2

double

y2

double

verticalLineX

double

Returns

double

Coerce(double, double, double)

Declaration

cs-api-definition
public static double Coerce(double value, double min, double max)

Parameters

value

double

min

double

max

double

Returns

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

cs-api-definition
public static RadPoint GetArcPoint(double angle, RadPoint center, double radius)

Parameters

angle

double

center

RadPoint

radius

double

Returns

RadPoint

GetPointDistance(double, double, double, double)

Gets the distance between two points in a plane.

Declaration

cs-api-definition
public static double GetPointDistance(double x1, double x2, double y1, double y2)

Parameters

x1

double

The x-coordinate of the first point.

x2

double

The x-coordinate of the second point.

y1

double

The y-coordinate of the first point.

y2

double

The y-coordinate of the second point.

Returns

double

IsOne(decimal)

Determines whether the specified value is close to 1 within the order of EPSILON.

Declaration

cs-api-definition
public static bool IsOne(decimal value)

Parameters

value

decimal

The decimal value to check.

Returns

bool

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

cs-api-definition
public static bool IsOne(double value)

Parameters

value

double

The value to check.

Returns

bool

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

cs-api-definition
public static bool IsZero(decimal value)

Parameters

value

decimal

The decimal value to check.

Returns

bool

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

cs-api-definition
public static bool IsZero(double value)

Parameters

value

double

The value to check.

Returns

bool

True if the value is close to zero; otherwise, false.

TrimLineSegmentToArea(ref RadPoint, ref RadPoint, RadRect)

Declaration

cs-api-definition
public static void TrimLineSegmentToArea(ref RadPoint point1, ref RadPoint point2, RadRect plotAreaClip)

Parameters

point1

RadPoint

point2

RadPoint

plotAreaClip

RadRect