-
Notifications
You must be signed in to change notification settings - Fork 4
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
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
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);