pub struct Spring {
pub stiffness: f32,
pub damping: f32,
}Expand description
弹簧参数:刚度与阻尼。
stiffness(k)越大,回目标越快;damping(c)越小,过冲/回弹越明显。c²与4k:c² < 4k欠阻尼(过冲),= 4k临界(最快无过冲),> 4k过阻尼(缓慢无过冲)。
Fields§
§stiffness: f32§damping: f32Implementations§
Trait Implementations§
impl Copy for Spring
impl StructuralPartialEq for Spring
Auto Trait Implementations§
impl Forget for Spring
impl Freeze for Spring
impl Move for Spring
impl RefUnwindSafe for Spring
impl Send for Spring
impl Sync for Spring
impl Unpin for Spring
impl UnsafeUnpin for Spring
impl UnwindSafe for Spring
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