(self, ms, edge)
| 2084 | self._offset = abs(offset) |
| 2085 | |
| 2086 | def closeto(self, ms, edge): |
| 2087 | # Allow more slop when the offset is large compared to the step. |
| 2088 | if self._offset > 0: |
| 2089 | digits = np.log10(self._offset / self.step) |
| 2090 | tol = max(1e-10, 10 ** (digits - 12)) |
| 2091 | tol = min(0.4999, tol) |
| 2092 | else: |
| 2093 | tol = 1e-10 |
| 2094 | return abs(ms - edge) < tol |
| 2095 | |
| 2096 | def le(self, x): |
| 2097 | """Return the largest n: n*step <= x.""" |