New to Telerik UI for WPFStart a free 30-day trial

RadMath

Class

Provides static mathematical functions and constants.

Definition

Namespace:Telerik.Charting

Assembly:Telerik.Windows.Controls.Chart.dll

Syntax:

C#
public static class RadMath

Inheritance: objectRadMath

Fields

The factor used to convert degrees to their radians equivalent.

C#
public const double DegToRadFactor = 0.017453292519943295

Smallest unit such that 1.0+DBL_EPSILON != 1.0.

C#
public const double Epsilon = 2.220446049250313E-09

The factor used to convert radians to their degree equivalent.

C#
public const double RadToDegFactor = 57.29577951308232

Methods

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

C#
public static bool AreClose(double value1, double value2, double tolerance)
Parameters:value1double

The first value.

value2double

The second value.

tolerancedouble

The allowed tolerance.

Returns:

bool

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

C#
public static bool AreClose(double value1, double value2)
Parameters:value1double

The first value.

value2double

The second value.

Returns:

bool

Gets the point that lies on the arc segment of the ellipse, described by the center and radius parameters.

C#
public static RadPoint GetArcPoint(double angle, RadPoint center, double radius)
Parameters:angledouble

The arc segment angle.

centerRadPoint

The center of the ellipse.

radiusdouble

The radius.

Returns:

RadPoint

Gets the distance between two points in a plane.

C#
public static double GetPointDistance(double x1, double x2, double y1, double y2)
Parameters:x1double

The x-coordinate of the first point.

x2double

The x-coordinate of the second point.

y1double

The y-coordinate of the first point.

y2double

The y-coordinate of the second point.

Returns:

double

Gets the polar coordinates (radius and angle) from the given arcPoint.

C#
public static void GetPolarCoordinates(RadPoint arcPoint, RadPoint center, out double radius, out double angle)
Parameters:arcPointRadPoint

The point in cartesian coordinates.

centerRadPoint

The center.

radiusdouble

The distance from the center.

angledouble

The angle in degrees.

Remarks:

This is the reverse operation of GetArcPoint(double, RadPoint, double).

Gets the standard deviation of a set of numbers.

C#
public static double GetStandardDeviation(IEnumerable<double> values)
Parameters:valuesIEnumerable<double>Returns:

double

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

C#
public static bool IsOne(decimal value)
Parameters:valuedecimal

The value.

Returns:

bool

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

C#
public static bool IsOne(double value)
Parameters:valuedouble

The value.

Returns:

bool

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

C#
public static bool IsZero(decimal value)
Parameters:valuedecimal

The value.

Returns:

bool

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

C#
public static bool IsZero(double value)
Parameters:valuedouble

The value.

Returns:

bool