1
0
Fork 0

Fix interpolate() so that interpolate("/prop/name") freezes the

interpolation at the current value.  This was always a feature of the
C++ code, but the Nasal wrapper couldn't handle the empty argument
list.
This commit is contained in:
andy 2005-06-29 23:58:58 +00:00
parent c20d609bfb
commit f1c70da6d4

View file

@ -59,7 +59,7 @@ abs = func { if(arg[0] < 0) { -arg[0] } else { arg[0] } }
interpolate = func {
if(isa(arg[0], props.Node)) { arg[0] = arg[0]._g; }
elsif(typeof(arg[0]) != "scalar") { return; }
_interpolate(arg[0], subvec(arg, 1));
_interpolate(arg[0], size(arg) == 1 ? [] : subvec(arg, 1));
}
##