FYI QB64 has _Hypot(x, y) function!
https://qb64phoenix.com/qb64wiki/index.php/HYPOT
For 2 points (x1, y1) and (x2, y2)
dist = _Hypot(x1 - x2, y1 - y2)
Edit: Correction there should be a minus sign between y1 and y2 not a comma! apologies
https://qb64phoenix.com/qb64wiki/index.php/HYPOT
For 2 points (x1, y1) and (x2, y2)
dist = _Hypot(x1 - x2, y1 - y2)
Edit: Correction there should be a minus sign between y1 and y2 not a comma! apologies
b = b + ...