pub struct BoundedFrictionSimulation { /* private fields */ }Expand description
A FrictionSimulation that clamps the modeled particle to a specific
range of values.
Only the position is clamped. The velocity dx will
continue to report unbounded simulated velocities once the particle has
reached the bounds.
Implementations§
Source§impl BoundedFrictionSimulation
impl BoundedFrictionSimulation
Sourcepub fn new(
drag: f64,
position: f64,
velocity: f64,
min_x: f64,
max_x: f64,
) -> BoundedFrictionSimulation
pub fn new( drag: f64, position: f64, velocity: f64, min_x: f64, max_x: f64, ) -> BoundedFrictionSimulation
Creates a BoundedFrictionSimulation with the given arguments, namely:
the fluid drag coefficient cₓ, a unitless value; the initial position
x₀, in the same length units as used for x; the
initial velocity dx₀, in the same velocity units as used for
dx, the minimum value for the position, and the
maximum value for the position. The minimum and maximum values must be
in the same units as the initial position, and the initial position must
be within the given range.
Trait Implementations§
Source§impl Debug for BoundedFrictionSimulation
impl Debug for BoundedFrictionSimulation
Auto Trait Implementations§
impl Forget for BoundedFrictionSimulation
impl Freeze for BoundedFrictionSimulation
impl Move for BoundedFrictionSimulation
impl RefUnwindSafe for BoundedFrictionSimulation
impl Send for BoundedFrictionSimulation
impl Sync for BoundedFrictionSimulation
impl Unpin for BoundedFrictionSimulation
impl UnsafeUnpin for BoundedFrictionSimulation
impl UnwindSafe for BoundedFrictionSimulation
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