Spaces:
Sleeping
Sleeping
Commit
·
8292a15
1
Parent(s):
0dc3521
Variable renaming
Browse files- hdinterval.py +2 -2
hdinterval.py
CHANGED
@@ -58,8 +58,8 @@ class HDInterval:
|
|
58 |
if any(math.isclose(x, target, abs_tol=tolerance) for x in interval):
|
59 |
return ci
|
60 |
|
61 |
-
|
62 |
-
ci =
|
63 |
jump /= 2
|
64 |
|
65 |
return self._at(target, tolerance, ci, jump)
|
|
|
58 |
if any(math.isclose(x, target, abs_tol=tolerance) for x in interval):
|
59 |
return ci
|
60 |
|
61 |
+
adjust = op.sub if target in interval else op.add
|
62 |
+
ci = adjust(ci, jump)
|
63 |
jump /= 2
|
64 |
|
65 |
return self._at(target, tolerance, ci, jump)
|