You don’t. There is really no need to. Perform your first distance test and set that value as “Closest”. Then compare against that baseline in all subsequent tests. If the new test is a better match, override your current value and continue with remaining tests.