shift_arg_formula now calls t automatically

This commit is contained in:
Zeno Rogue 2020-05-16 02:12:34 +02:00
parent cbb98c7899
commit 3e7f4374a6
1 changed files with 2 additions and 1 deletions

View File

@ -100,10 +100,11 @@ EX namespace arg {
EX bool argis(const string& s) { if(args()[0] == '-' && args()[1] == '-') return args().substr(1) == s; return args() == s; }
EX void shift_arg_formula(ld& x, const reaction_t& r IS(reaction_t())) {
shift(); x = argf();
shift(); ld old = x; x = argf();
#if CAP_ANIMATIONS
anims::animate_parameter(x, args(), r);
#endif
if(old != x && r) r();
}
#if HDR