Class ChartMath
Contains static methods for performing certain mathematical calculations.
Inheritance
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.SfChart.UWP.dll
Syntax
public static class ChartMath : Object
Fields
DoublePI
Initializes DoublePI
Declaration
public const double DoublePI = 6.2831853071795862
Field Value
Type |
---|
System.Double |
Epsilon
The epsilon
Declaration
public const double Epsilon = 1E-05
Field Value
Type |
---|
System.Double |
HalfPI
Initializes HalfPI
Declaration
public const double HalfPI = 1.5707963267948966
Field Value
Type |
---|
System.Double |
OneAndHalfPI
Initializes OneAndHalfPI
Declaration
public const double OneAndHalfPI = 4.71238898038469
Field Value
Type |
---|
System.Double |
Percent
Initializes Percent
Declaration
public const double Percent = 0.01
Field Value
Type |
---|
System.Double |
ToDegree
Initializes ToDegree
Declaration
public const double ToDegree = 57.295779513082323
Field Value
Type |
---|
System.Double |
ToRadial
Initializes ToRadial
Declaration
public const double ToRadial = 0.017453292519943295
Field Value
Type |
---|
System.Double |
Methods
GeneralPointRotation(Point, Point, Double)
return point values from the given origin,end and angle points
Declaration
public static Point GeneralPointRotation(Point originpoint, Point endpoint, double angle)
Parameters
Type | Name | Description |
---|---|---|
Windows.Foundation.Point | originpoint | |
Windows.Foundation.Point | endpoint | |
System.Double | angle |
Returns
Type |
---|
Windows.Foundation.Point |
GetNormal(Vector3D, Vector3D, Vector3D)
Method used to get the normal.
Declaration
public static Vector3D GetNormal(Vector3D v1, Vector3D v2, Vector3D v3)
Parameters
Type | Name | Description |
---|---|---|
Vector3D | v1 | |
Vector3D | v2 | |
Vector3D | v3 |
Returns
Type |
---|
Vector3D |
IntersectWith(IList<Rect>, Rect)
Method used to gets or sets intersect of two rectangle.
Declaration
public static bool IntersectWith(this IList<Rect> rectCollection, Rect newRect)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<Windows.Foundation.Rect> | rectCollection | |
Windows.Foundation.Rect | newRect |
Returns
Type |
---|
System.Boolean |
Max(Double[])
Gets maximal value from parameters.
Declaration
public static double Max(params double[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | values | The parameters |
Returns
Type | Description |
---|---|
System.Double | The maximal value. |
MaxZero(Double)
Gets maximal value from parameter or zero.
Declaration
public static double MaxZero(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double | The double value |
Min(Double[])
Gets minimal value from parameters.
Declaration
public static double Min(params double[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | values | The parameters |
Returns
Type | Description |
---|---|
System.Double | The minimal value. |
MinMax(Double, Double, Double)
Gets minimal value from value
or min
and maximal from value
or max
.
Declaration
public static double MinMax(double value, double min, double max)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
System.Double | min | The minimal value. |
System.Double | max | The maximal value. |
Returns
Type | Description |
---|---|
System.Double | The MinMax value |
MinZero(Double)
Gets minimal value from parameter or zero.
Declaration
public static double MinZero(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value. |
Returns
Type | Description |
---|---|
System.Double | The MinZero value |
Round(Double, Double, Boolean)
Rounds the specified value.
Declaration
public static double Round(double x, double div, bool up)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x value. |
System.Double | div | The divider. |
System.Boolean | up | if set to |
Returns
Type | Description |
---|---|
System.Double | The Round off value |
SolveQuadraticEquation(Double, Double, Double, out Double, out Double)
Solves quadratic equation in form ax^2 + bx + c = 0
Declaration
public static bool SolveQuadraticEquation(double a, double b, double c, out double root1, out double root2)
Parameters
Type | Name | Description |
---|---|---|
System.Double | a | The A component |
System.Double | b | The B component |
System.Double | c | The C component |
System.Double | root1 | First root. |
System.Double | root2 | Second root. |
Returns
Type | Description |
---|---|
System.Boolean | Bool value |