Move Animatable::get_zero_value to ToAnimatedZero::to_animated_zero

This commit is contained in:
Anthony Ramine 2017-07-18 15:48:29 +02:00
parent 99592cc3d1
commit 98bf832169
13 changed files with 293 additions and 127 deletions

View file

@ -129,6 +129,8 @@
% if animation_value_type == "ComputedValue":
use properties::animated_properties::Animatable;
use values::animated::ToAnimatedZero;
impl Animatable for T {
fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
-> Result<Self, ()> {
@ -149,6 +151,11 @@
self.0.compute_squared_distance(&other.0)
}
}
impl ToAnimatedZero for T {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
}
% endif
pub type Iter<'a, 'cx, 'cx_a> = ComputedVecIter<'a, 'cx, 'cx_a, super::single_value::SpecifiedValue>;