Fix interpolation of enabled flag.

This commit is contained in:
Robin KAY 2023-01-05 02:58:10 +00:00
parent 7b5650fbdb
commit c70c3d3b76
1 changed files with 4 additions and 2 deletions

View File

@ -113,10 +113,12 @@ impl Lerp for OutlineVolume {
fn lerp(&self, other: &Self, scalar: &Self::Scalar) -> Self {
OutlineVolume {
visible: if *scalar >= 0.5 {
visible: if *scalar <= 0.0 {
self.visible
} else if *scalar >= 1.0 {
other.visible
} else {
self.visible
self.visible | other.visible
},
width: self.width.lerp(&other.width, scalar),
colour: {