You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plaese consider adding min() and max() functions to arithmetic functions.
Currently to get mininum value of two variables I am using: {{ $res := subtract 1 (or (and (gt ($len_loc) $idx) (add 1 $idx)) ($len_loc)) }}
which is... well, not very readable. (subtract and add are to work around $idx being 0 as or sees this as false value. $len_loc is a length of an array).
And this is just for 2 variables... pipelining this would be a nightmare, as opposed to for example: min $x | min $y | min $i $j
The text was updated successfully, but these errors were encountered:
Plaese consider adding min() and max() functions to arithmetic functions.
Currently to get mininum value of two variables I am using:
{{ $res := subtract 1 (or (and (gt ($len_loc) $idx) (add 1 $idx)) ($len_loc)) }}
which is... well, not very readable. (subtract and add are to work around
$idx
being 0 asor
sees this as false value.$len_loc
is a length of an array).And this is just for 2 variables... pipelining this would be a nightmare, as opposed to for example:
min $x | min $y | min $i $j
The text was updated successfully, but these errors were encountered: