mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Derive ComputeSquaredDistance
This commit is contained in:
parent
51b740033b
commit
277351da35
22 changed files with 162 additions and 391 deletions
|
@ -227,18 +227,6 @@ impl Animatable for SimpleShadow {
|
|||
}
|
||||
}
|
||||
|
||||
impl ComputeSquaredDistance for SimpleShadow {
|
||||
#[inline]
|
||||
fn compute_squared_distance(&self, other: &Self) -> Result<SquaredDistance, ()> {
|
||||
Ok(
|
||||
self.color.compute_squared_distance(&other.color)? +
|
||||
self.horizontal.compute_squared_distance(&other.horizontal)? +
|
||||
self.vertical.compute_squared_distance(&other.vertical)? +
|
||||
self.blur.compute_squared_distance(&other.blur)?
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl ToAnimatedZero for SimpleShadow {
|
||||
#[inline]
|
||||
fn to_animated_zero(&self) -> Result<Self, ()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue