skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact 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 Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free 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
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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.

TrimLineSegmentToArea(ref RadPoint, ref RadPoint, RadRect)

Declaration
public static void TrimLineSegmentToArea(ref RadPoint point1, ref RadPoint point2, RadRect plotAreaClip)
Parameters
RadPoint point1

RadPoint point2

RadRect plotAreaClip

Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • 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.