|
Name
|
Description
|
|
AccelTime(double, double, double, bool)
|
Calculates the time to go from 0 to v with accelration acc then v to 0 using acc if tozero=true.
|
|
AlignBox(List<Point2d>)
|
Calculates the align angle of a set of points using the minimum bounding box metric
|
|
AlignBox(Poly2d)
|
|
|
AlignHeight(List<Point2d>, double)
|
|
|
AlignHull(List<Point2d>)
|
Calculates the align angle of a set of points using the longest edge of the convex hull as metric
|
|
AlignHull(Poly2d)
|
|
|
AlignMER(List<Point2d>)
|
|
|
AlignMER(Poly2d)
|
Rotate with -angle to align
|
|
AlignMER(Region2d)
|
Rotate with -angle to align
|
|
AlignedBox(List<Point2d>)
|
Calculates the minimum bounding rectangle of a set of points
|
|
AlmostZero(double)
|
|
|
AngleEquals(double, double, double)
|
Checks if two angles are equal with a small tolerance.
|
|
AngularDifferance(double, double, Direction)
|
Returns the included angle between two given angles and a direction.
|
|
Biarc(Point2d, Vector2d, Point2d, Vector2d, out Arc2d, out Arc2d)
|
Calculates a biarc from pt1 to pt2.
|
|
Biarc(Point3d, Vector3d, Point3d, Vector3d, out Arc3d, out Arc3d)
|
|
|
Bias(double, double)
|
|
|
BiasOriginal(double, double)
|
|
|
BinomCoefficient(long, long)
|
Calculates the binomial coefficient (nCk) (N items, choose k)
|
|
Bisect(Point2d, Point2d, Point2d)
|
Computes the bisector. In this case, computes the point between two 'leg' points that will
split them with equal angles with respect to a tip.
|
|
Bisection(List<Double>, double, double, double, int, out double)
|
Helper for solvePoly
|
|
BosseSeg(Arc3d, int, double)
|
|
|
Brent(double, double, Func<DoubleDouble>, out double, double, double)
|
Computes a Brent-style root bracketing. Returns true on success, or false on failure.
Failure can only happen if the function value at xmin and xmax has the same sign,
and the function values at xmin/xmax is not within zero tolerance.
|
|
CalcFit(Extents2d, int, Extents2d)
|
|
|
Clamp(double, double, double)
|
Clamps a value between vmin and vmax.
|
|
Clamp(int, int, int)
|
Clamps a value between vmin and vmax.
|
|
ClipLine(ref double, ref double, ref double, ref double, double, double, double, double)
|
|
|
CreateSpiral(double, double, double, double, int)
|
|
|
CubeRoot(double)
|
|
|
CubicRoot(double)
|
Computes the cubic root (third root) of a number.
|
|
DifferentialAngle(double, double)
|
|
|
Equals(double, double)
|
Checks if two numbers are closer to each other than Epsilon.
|
|
Equals(double, double, double)
|
Tests if two real numbers are equal within a given tolerance.
|
|
Erf(double)
|
erf(x) is the "error function" encountered in integrating the normal distribution (which is a normalized form of the Gaussian function).
|
|
EvalPoly(List<Double>, double)
|
Evaluates a polynom.
|
|
FindMax(NumericFunctionDelegate, object, double, int, double, double, out double)
|
|
|
FindMin(NumericFunctionDelegate, object, double, int, double, double, out double)
|
Numerically finds the minimum of a function.
|
|
FindZerosOfFunction(NumericFunctionDelegate, double[], object, long, double, double, double, double)
|
Numerically searches for zeroes of a given functions.
|
|
Flatten(double, double, double, FlattenEvalCallback)
|
|
|
Gain(double, double)
|
|
|
GainOriginal(double, double)
|
|
|
GaussSolve(double[,])
|
Solve a system of n equations in n unknowns using Gaussian Elimination
Solve an equation in matrix form Ax = b
The 2D array a is the matrix A with an additional column b.
This is often written (A:b)
A0,0 A1,0 A2,0 .... An-1,0 b0
A0,1 A1,1 A2,1 .... An-1,1 b1
A0,2 A1,2 A2,2 .... An-1,2 b2
: : : : :
: : : : :
A0,n-1 A1,n-1 A2,n-1 .... An-1,n-1 bn-1
Returns an array of solutions, or null if if the system of equations is singular.
Sample for solving center for a circle through three points:
double[] sm=new double[2,3]; //two rows, three coefficients
sm[0, 0] = 2 * p0.y - 2 * p1.y;
sm[0, 1] = 2 * p0.x - 2 * p1.x;
sm[0, 2] = -(p1.x * p1.x + p1.y * p1.y - p0.x * p0.x - p0.y * p0.y);
sm[1, 0] = 2 * p0.y - 2 * p2.y;
sm[1, 1] = 2 * p0.x - 2 * p2.x;
sm[1, 2] = -(p2.x * p2.x + p2.y * p2.y - p0.x * p0.x - p0.y * p0.y);
double[] center=Calc.GaussSolve(sm);
|
|
GetBarycentricWeights(Point2d, Point2d, Point2d, Point2d, out double, out double, out double)
|
Computes the barycentric weights of a point to the triangle A-B-C and put it in the
weights u-v-w. If the triangle is degenerate, this function returns false and u,v,w is set to 1/3 (centroid).
otherwise true is returned.
|
|
GetCentralPoint(Region2d, out double)
|
Calculates a point inside the region with the furthest distance to any contour.
|
|
GetConicType(double, double, double, double, double, double)
|
Calculates to type of conic from the equation Ax^2+Bxy+Cy^2+Dx+Ey+F=0.
|
|
GetDerivative(List<Double>)
|
Gets the derivative of a polynom ex ax^5+bx^4+cx^3+dx^2+ex+f
|
|
GetStandoffDist(double, double, double, double)
|
|
|
GetX(Point2d, Point2d, double)
|
Calculates the X-coordinate of a line defined by a,b at y.
|
|
GetY(Point2d, Point2d, double)
|
Calculates the Y-coordinate of a line defined by a,b at x.
|
|
GreaterEqual(double, double, double)
|
|
|
Hypot(double, double)
|
Computes the length of the hypotenuse of a right triangle given the length of the catheti.
|
|
InsertionSort<T>(IList<T>, Comparison<T>)
|
|
|
IntegrateSimpson(IntegrationFunction, double, double, int, double)
|
Returns the integral of the function func from a to b.
Integration is performed by Simpson’s rule.
|
|
Interpolate(double, double, double)
|
|
|
InterpolateAngle(double, double, double)
|
Interpolates shortest way between v0 and v1 par:0-1
|
|
IsAngleBetween(double, double, double, Direction)
|
Checks if an angle lies between two other angles, in the given direction.
|
|
IsEven(int)
|
Checks if an integer is even.
|
|
IsFinite(double)
|
|
|
IsNotFinite(double)
|
|
|
IsZero(double, double)
|
Checks if a number is closer to zero than Epsilon.
|
|
LeastSquareFit(List<Point2d>)
|
|
|
LessEqual(double, double, double)
|
|
|
LowerBound<T>(List<T>, T)
|
Returns the lower bound of lst seaching for a.
lst must be sorted.
|
|
Map(double, double, double, double, double)
|
Maps 'value' in range inMin-inMax to the range outMin-outMax.
|
|
Max(params double[])
|
Returns the maximum number of an arbitrary number of doubles.
|
|
Min(params double[])
|
Returns the minimum number of an arbitrary number of doubles.
|
|
Mod(int, int)
|
Special modulus that works with negative numbers in a way that's suitable
for circular arrays. For example Mod(-1,10) will return 9.
|
|
MultiNewton(MultiFunction, double[], double)
|
|
|
NormalizeAngle(double)
|
Computes the normalized angle (between 0 and 2*PI) of a given angle.
Both positive and negative angles handled correctly.
|
|
NormalizeAngleSide(double)
|
Normalizes an angle betwee -PI and PI
|
|
PointsOnSphere(Point3d, double, int)
|
|
|
PointsVector(Point3d, Vector3d, int, Random)
|
|
|
ProjectedSignedAngle(Vector3d, Vector3d, Vector3d)
|
|
|
Rand(Random, double)
|
Non uniform random variable R[x] = sqrt(x)^fac
|
|
RandomPoly(int, int, Extents2d)
|
|
|
RandomShuffle<T>(List<T>, Random)
|
Random shuffle of a list
|
|
RemapParam(double, double, double)
|
Remaps a parameter (0-1) to a new range min-max
|
|
RotatingCalipers(List<Point2d>)
|
|
|
Round(double)
|
|
|
SolveCubic(double, double, double, double, List<Double>)
|
Solves the cubic equation c3*x^3 + c2*x^2 + c1 * x+ c0 = 0 for x.
|
|
SolvePoly(List<Double>, double, double, double, List<Double>)
|
General polynomial solver.
|
|
SolveQuadric(double, double, double, List<Double>, double)
|
Solves the quadric equation c2*x^2 + c1 * x+ c0 = 0 for x.
|
|
SolveQuartic(double, double, double, double, double, List<Double>)
|
Solves the cubic equation c4*x^4 + c3*x^3 + c2*x^2 + c1 * x+ c0 = 0 for x.
|
|
StandardDeviation(List<Double>)
|
|
|
Swap(ref double, ref double)
|
|
|
Swap<T>(IList<T>, int, int)
|
|
|
Swap<T>(ref T, ref T)
|
Generic swap method
|
|
ToDegrees(double)
|
|
|
ToRadians(double)
|
|
|
TransformAngle(double, Matrix2d)
|
|
|
TriangleArea(Point2d, Point2d, Point2d)
|
Computes a triangles area.
|
|
TriangleArea(double, double, double)
|
Computes a triangles area given length of its sides using herons formula
|
|
Unique(List<Double>, double)
|
|
|
Unique<T>(List<T>)
|
|
|
Variance(List<Double>)
|
|