mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Merge ComputeDistance trait into Animatable trait
This commit is contained in:
parent
4d25e87ac6
commit
6dfc1d1aa8
10 changed files with 481 additions and 684 deletions
|
@ -2181,7 +2181,7 @@ ${helpers.single_keyword("transform-style",
|
|||
use values::specified::{NoCalcLength, LengthOrPercentage, Percentage};
|
||||
|
||||
pub mod computed_value {
|
||||
use properties::animated_properties::{Animatable, ComputeDistance};
|
||||
use properties::animated_properties::Animatable;
|
||||
use values::computed::{Length, LengthOrPercentage};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
|
@ -2201,9 +2201,7 @@ ${helpers.single_keyword("transform-style",
|
|||
depth: try!(self.depth.interpolate(&other.depth, time)),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ComputeDistance for T {
|
||||
#[inline]
|
||||
fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
|
||||
self.compute_squared_distance(other).map(|sd| sd.sqrt())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue