Simplified formula by using Math.hypot and simplifying overlap area formula.