skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadMath

Provides static mathematical functions and constants.

Inheritance
System.Object
RadMath
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.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

Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.