Skip to content

Commit

Permalink
Fix linear mapping for center slider
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Aug 19, 2023
1 parent dcda0cd commit 60aed4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/input/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ impl CenterSliderInput {
.unwrap_or(Ordering::Equal)
{
Ordering::Equal => center_value,
Ordering::Less => -position * (center_value - min_value) + min_value,
Ordering::Less => position * (center_value - min_value) + center_value,
Ordering::Greater => position * (max_value - center_value) + center_value,
}
}
Expand Down

0 comments on commit 60aed4f

Please sign in to comment.