LGTM is it easy to have a diff global holding the tolerance-squared?
Checked in with suggestion incorporated as r2332