move: add move_dampen(), deprecate move_stop()

This commit is contained in:
Andrei Alexeyev 2023-02-15 22:51:00 +01:00
parent 9502941631
commit 8b3e6d5569
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -66,6 +66,14 @@ INLINE MoveParams move_towards_power(cmplx target, cmplx attraction, real expone
};
}
INLINE MoveParams move_dampen(cmplx vel, cmplx retention) {
return (MoveParams) {
.velocity = vel,
.retention = retention,
};
}
attr_deprecated("Use move_dampen instead")
INLINE MoveParams move_stop(cmplx retention) {
return (MoveParams) { .retention = retention };
}