pub struct AndroidFlingSpline;Expand description
Android fling spline implementation.
This is a port of Android’s native fling scroll physics from android.widget.Scroller.
It provides smooth, natural-feeling fling deceleration.
Implementations§
Source§impl AndroidFlingSpline
impl AndroidFlingSpline
Sourcepub fn fling_position(time: f32) -> FlingResult
pub fn fling_position(time: f32) -> FlingResult
Sample the spline at a given time (0.0 to 1.0).
Returns coefficients for distance and velocity at that point in the fling.
Sourcepub fn deceleration(velocity: f32, friction: f32) -> f64
pub fn deceleration(velocity: f32, friction: f32) -> f64
Compute deceleration rate for a given velocity and friction.
Auto Trait Implementations§
impl Freeze for AndroidFlingSpline
impl RefUnwindSafe for AndroidFlingSpline
impl Send for AndroidFlingSpline
impl Sync for AndroidFlingSpline
impl Unpin for AndroidFlingSpline
impl UnsafeUnpin for AndroidFlingSpline
impl UnwindSafe for AndroidFlingSpline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more