Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool function(double dist0, double dist1, double dist2, double tolerance)
- {
- const double minDist = mathlib::min(dist0, dist1, dist2);
- if (minDist > tolerance)
- return false;
- if (dist0 <= tolerance)
- {
- idx1 = trg0;
- idx2 = trg1;
- return true;
- }
- if (dist1 <= tolerance)
- {
- idx1 = trg0;
- idx2 = trg2;
- return true;
- }
- if (dist2 <= tolerance)
- {
- idx1 = trg1;
- idx2 = trg2;
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement