From c70c3d3b76610044dab835733403d3599ea9cfe9 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Thu, 5 Jan 2023 02:58:10 +0000 Subject: [PATCH] Fix interpolation of enabled flag. --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index de39d07..8fec0ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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: {