Stop using the deprecated range function.

This commit is contained in:
Ms2ger 2015-04-22 19:51:17 +02:00
parent c4b7979450
commit 4d41f1c991
17 changed files with 27 additions and 28 deletions

View file

@ -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