mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Stop using the deprecated range function.
This commit is contained in:
parent
c4b7979450
commit
4d41f1c991
17 changed files with 27 additions and 28 deletions
|
@ -59,7 +59,7 @@ impl Bezier {
|
|||
fn solve_curve_x(&self, x: f64, epsilon: f64) -> f64 {
|
||||
// Fast path: Use Newton's method.
|
||||
let mut t = x;
|
||||
for _ in range(0, NEWTON_METHOD_ITERATIONS) {
|
||||
for _ in 0..NEWTON_METHOD_ITERATIONS {
|
||||
let x2 = self.sample_curve_x(t);
|
||||
if x2.approx_eq(x, epsilon) {
|
||||
return t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue