Skip to content

Commit

Permalink
Implement Lerp for Val::Vw and Val::Vh
Browse files Browse the repository at this point in the history
  • Loading branch information
wiggleforlife authored and mockersf committed Nov 15, 2024
1 parent 33e4444 commit 7fa6c4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/implemented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ impl Lerp for EaseValue<Val> {
(Val::Px(self_val), Val::Px(other_val)) => {
EaseValue(Val::Px(Lerp::lerp(&self_val, &other_val, scalar)))
}
(Val::Vw(self_val), Val::Vw(other_val)) => {
EaseValue(Val::Vw(Lerp::lerp(&self_val, &other_val, scalar)))
}
(Val::Vh(self_val), Val::Vh(other_val)) => {
EaseValue(Val::Vh(Lerp::lerp(&self_val, &other_val, scalar)))
}
_ => EaseValue(self.0),
}
}
Expand Down

0 comments on commit 7fa6c4a

Please sign in to comment.