Click or drag to resize

MathRoutines Methods

LightningChart .NET Help

The MathRoutines type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAngleDegInFirstFullCircle
Retrieve the input angle value as positive angle of the first full rotation in degrees.

Note that the range contains 0, but not the "full angle" of 360 degrees.

Public methodStatic memberAngleDiffDeg
Solve smallest absolute difference between two angles in degrees. This takes in account the periodic nature of the values, meaning that full circles do not affect the difference.

Useful in comparing the difference of angles, e.g. on testing if angles are the same.

Note that the type of angle unit affects the result. Use AngleDiffRad(Double, Double) for radians.

Public methodStatic memberAngleDiffRad
Solve smallest absolute difference between two angles in radians. This takes in account the periodic nature of the values, meaning that full circles do not affect the difference.

Useful in comparing the difference of angles, e.g. on testing if angles are the same.

Note that the type of angle unit affects the result. Use AngleDiffDeg(Double, Double) for degrees and examples.

Public methodStatic memberAngleRadInFirstFullCircle
Retrieve the input angle value as positive angle of the first full rotation in radians.

Note that the range contains 0, but not the "full angle" of PI radians.

Public methodStatic memberCalcAngleOfLineVectorDouble
Calculates angle of line going from pointFrom to pointTo
Public methodStatic memberCalcAngleOfLineVectorFloat
Calculates angle of line going from pointFrom to pointTo
Public methodStatic memberCalcTwoCirclesIntersections
Calculates intersection point(-s) of two circles.
Public methodStatic memberCalcTwoLinesIntersection(PointDouble2D, PointDouble2D, PointDouble2D, PointDouble2D, PointDouble2D)
Calculates intersection point of two lines. Line 1: goes through A1 and A2 Line 2: goes through B1 and B2
Public methodStatic memberCalcTwoLinesIntersection(PointFloat, PointFloat, PointFloat, PointFloat, PointFloat)
Calculates intersection point of two lines. Line 1: goes through A1 and A2 Line 2: goes through B1 and B2
Public methodStatic memberDegreesAsRadians
Convert degrees to radians.
Public methodStatic memberDistanceOfPoints
Calculates distance between two points.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGradsAsRadians
Convert gradians to radians.
Public methodStatic memberHypotrochoid
Hyptrochoid
Public methodStatic memberLinearFitSolveFactors
Calculate linear fit from given points. Makes best fit with Least Square regression method. A line equation is y = k*x + b, that is, y = gradient * x + coefficient
Public methodStatic memberLinearRegression
Calculate linear line fit for given points
Public methodStatic memberLineIntersection(PointDouble2D, PointDouble2D, PointDouble2D, PointDouble2D, PointDouble2D)
Calculates intersection point of two lines. Line 1: goes through A1 and A2. Line 2: goes through B1 and B2. Algorithm copied from http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
Public methodStatic memberLineIntersection(PointFloat, PointFloat, PointFloat, PointFloat, PointFloat)
Calculates intersection point of two lines. Line 1: goes through A1 and A2. Line 2: goes through B1 and B2. Algorithm copied from http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
Public methodStatic memberMysteryCurve
Mystery curve
Public methodStatic memberPointDistanceFromLine(PointFloat, PointFloat, PointFloat)
Calculates distance from line to point.
Public methodStatic memberPointDistanceFromLine(PointFloat, PointFloat, PointFloat, PointFloat, Single)
Calculates distance from line to point.
Public methodStatic memberPointDistanceFromLineSegment
Calculates distance from line segment to point.
Public methodStatic memberPointInsidePolygon
Check whether point is inside polygon. Algorithm from: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html Copyright (c) 1970-2003, Wm. Randolph Franklin. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. 2. Redistributions in binary form must reproduce the above copyright notice in the documentation and/or other materials provided with the distribution. 3. The name of W. Randolph Franklin may not be used to endorse or promote products derived from this Software without specific prior written permission. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Public methodStatic memberPolynomialRegression(Double, Double, Double, Int32)
Calculate polymial line fit. Calculates polynomial factors, and uses these factors to solve Y values based on given X value array.
Public methodStatic memberPolynomialRegression(Double, Double, Double, Int32, Double)
Calculate polymial line fit. Calculates polynomial factors, and uses these factors to solve Y values based on given X value array.
Public methodStatic memberRadiansAsDegrees
Convert radians to degrees.
Public methodStatic memberRadiansAsDegreesString
Make radians as degrees string.
Public methodStatic memberRadiansAsGrads
Convert radians to gradians.
Public methodStatic memberRadiansAsGradsString
Make radians as gradians string.
Public methodStatic memberRadiansAsString
Make radians as string.
Public methodStatic memberRelativeDistanceOfPoints
Calculates relative distance between two points.
Public methodStatic memberReplaceNaNs(Double, Double)
Replace NaN numbers with given value
Public methodStatic memberReplaceNaNs(Single, Single)
Replace NaN numbers with given value
Public methodStatic memberRotate
Rotate point.
Public methodStatic memberRoundToInt(Double)
Convert double value to nearest integer. The fast way.
Public methodStatic memberRoundToInt(Single)
Convert float value to nearest integer. The fast way.
Public methodStatic memberStandardDeviation
Calculate standard deviation of values
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also