int GetClosest(const Box& target, float threshold = 99999999999.0) { float best = threshold; float besti = -1; for (int i=0; i<MAX_TRACKER; i++) { if (tracker[i].is_active) { float d = target.GetDistance(tracker[i].box); if (d<best) { best = d; besti = i; } } } return besti; }