Try fixing the moving rainbow red purple glitch
This commit is contained in:
parent
709ce60b6d
commit
0ef7360e9a
@ -41,6 +41,8 @@ impl Pattern for MovingRainbow {
|
|||||||
// RAINBOW.len() * width
|
// RAINBOW.len() * width
|
||||||
let length_factor = u16::try_from(RAINBOW.len())
|
let length_factor = u16::try_from(RAINBOW.len())
|
||||||
.or(Err(()))?
|
.or(Err(()))?
|
||||||
|
.checked_add(self.skip.into())
|
||||||
|
.ok_or(())?
|
||||||
.saturating_mul(u16::from(self.width));
|
.saturating_mul(u16::from(self.width));
|
||||||
// The length of the buffer
|
// The length of the buffer
|
||||||
// Always a factor of length_factor
|
// Always a factor of length_factor
|
||||||
|
Loading…
Reference in New Issue
Block a user