diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2018-04-10 17:35:15 -0700 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2018-04-10 17:35:15 -0700 |
commit | c99bcdd4b8d4b4ac495d8a26eb8a4d2c710a2589 (patch) | |
tree | 26f5f8242e9de1b27166571c56ae03f22a22270d /components/style/bezier.rs | |
parent | f7ae1a37e3e004e156e5833551c486a7a5f189a0 (diff) | |
download | servo-c99bcdd4b8d4b4ac495d8a26eb8a4d2c710a2589.tar.gz servo-c99bcdd4b8d4b4ac495d8a26eb8a4d2c710a2589.zip |
Run rustfmt on selectors, servo_arc, and style.
This was generated with:
./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style
Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
Diffstat (limited to 'components/style/bezier.rs')
-rw-r--r-- | components/style/bezier.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/components/style/bezier.rs b/components/style/bezier.rs index 2e85f9cf095..b459367b0b4 100644 --- a/components/style/bezier.rs +++ b/components/style/bezier.rs @@ -71,11 +71,11 @@ impl Bezier { for _ in 0..NEWTON_METHOD_ITERATIONS { let x2 = self.sample_curve_x(t); if x2.approx_eq(x, epsilon) { - return t + return t; } let dx = self.sample_curve_derivative_x(t); if dx.approx_eq(0.0, 1e-6) { - break + break; } t -= (x2 - x) / dx; } @@ -84,16 +84,16 @@ impl Bezier { let (mut lo, mut hi, mut t) = (0.0, 1.0, x); if t < lo { - return lo + return lo; } if t > hi { - return hi + return hi; } while lo < hi { let x2 = self.sample_curve_x(t); if x2.approx_eq(x, epsilon) { - return t + return t; } if x > x2 { lo = t @@ -124,4 +124,3 @@ impl ApproxEq for f64 { (self - value).abs() < epsilon } } - |