Fix delay when changing scrolling direction (#13867)
Fixes: #13720. Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
parent
fa602001e3
commit
821aa0811d
2 changed files with 43 additions and 4 deletions
|
@ -2320,6 +2320,18 @@ impl Pixels {
|
|||
Self(self.0.abs())
|
||||
}
|
||||
|
||||
/// Returns the sign of the `Pixels` value.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// Returns:
|
||||
/// * `1.0` if the value is positive
|
||||
/// * `-1.0` if the value is negative
|
||||
/// * `0.0` if the value is zero
|
||||
pub fn signum(&self) -> f32 {
|
||||
self.0.signum()
|
||||
}
|
||||
|
||||
/// Returns the f64 value of `Pixels`.
|
||||
///
|
||||
/// # Returns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue