Skip to content

DistanceCheck

Stewart Thomson edited this page May 10, 2018 · 1 revision

bool DistanceCheck(Vector<double> point1, Vector<double> point2, double distance)

Checks whether two points lie within some distance in every dimension

Parameters

Vector<double> point1 | The first n dimensional point

Vector<double> point2 | The second n dimensional point

double distance | The maximum distance in each dimension allowed for points to be equivalent

Example

double[] varr1 = {0,2,4,6};
Vector<double> point1 = Vector.Build.DenseOfArray(varr1);
double[] varr2 = {0,1,2,3};
Vector<double> point2 = Vector.Build.DenseOfArray(varr2);
bool isInDistance = DistanceCheck(point1, point2, 2);
Clone this wiki locally