Return the largest n: n*step <= x.
(self, x)
| 2094 | return abs(ms - edge) < tol |
| 2095 | |
| 2096 | def le(self, x): |
| 2097 | """Return the largest n: n*step <= x.""" |
| 2098 | d, m = divmod(x, self.step) |
| 2099 | if self.closeto(m / self.step, 1): |
| 2100 | return d + 1 |
| 2101 | return d |
| 2102 | |
| 2103 | def ge(self, x): |
| 2104 | """Return the smallest n: n*step >= x.""" |
no test coverage detected