move: add move_from_towards_exp

This commit is contained in:
Andrei Alexeyev 2023-02-27 07:08:11 +01:00
parent cf2af23b06
commit 556f5b6667
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -84,6 +84,10 @@ INLINE MoveParams move_towards_exp(cmplx vel, cmplx target, cmplx attraction, re
};
}
INLINE MoveParams move_from_towards_exp(cmplx origin, cmplx target, cmplx attraction, real exponent) {
return move_next(origin, move_towards_exp(0, target, attraction, exponent));
}
attr_deprecated("Use move_towards_exp instead")
INLINE MoveParams move_towards_power(cmplx target, cmplx attraction, real exponent) {
return move_towards_exp(0, target, attraction, exponent);