mirror of
https://github.com/jhbruhn/eurorack.git
synced 2025-03-15 02:55:49 +00:00
Improve skew calculation
This commit is contained in:
parent
51ca5740b7
commit
653ade8847
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ class PotController {
|
|||
int32_t delta = value_ - previous_value_;
|
||||
|
||||
int32_t skew_ratio = delta > 0
|
||||
? (65600 - stored_value_) / (65535 - previous_value_)
|
||||
? (65600 - stored_value_) / (65600 - previous_value_)
|
||||
: (66 + stored_value_) / (66 + previous_value_);
|
||||
CONSTRAIN(skew_ratio, 6553, 655350);
|
||||
|
||||
|
|
Loading…
Reference in a new issue