---
source: gooey-macros/src/animation.rs
expression: unparse(ok)
---
impl ::gooey::animation::LinearInterpolate for Enum {
    /**# Panics
 Panics if the the enum variants are overflown (this can only happen on percentages outside 0..1 range).*/
    fn lerp(&self, __target: &Self, __percent: f32) -> Self {
        fn variant_to_index(__v: &Enum) -> usize {
            match __v {
                Enum::A => 0usize,
                Enum::B => 1usize,
            }
        }
        let __self = variant_to_index(&self);
        let __target = variant_to_index(&self);
        match ::gooey::animation::LinearInterpolate::lerp(
            &__self,
            &__target,
            __percent,
        ) {
            0usize => Enum::A,
            1usize => Enum::B,
            _ => Enum::B,
        }
    }
}

