#[derive(Lerp)]
{
// Attributes available to this derive:
#[lerp]
}
Expand description
Automatically derive the Lerp trait for any struct fields that derive lerp
This derive implementation will lerp each field of the struct independently
and assumes a generic implementation of Lerp over Float
types. If any
of the fields is generic only over one of the float values (f32, f64) that
can be specified by the #[lerp(f32)]
or #[lerp(f64)]
attributes respectively.
If you would like for the lerp implementation to ignore a field (or if it does
not derive lerp) you can use the #[lerp(skip)]
or #[lerp(ignore)]
attributes
which will produce the value, untouched from the left value.
Not all types are supported in this derive macro. See the github issue for discussion and more information