libavutil/eval: Add round function to expression parser

We have floor, ceil, and trunc. Let's add round.

Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Kevin Mark 2017-06-06 00:43:13 -04:00 committed by Michael Niedermayer
parent 850cbd496f
commit 482566ccc3
2 changed files with 7 additions and 1 deletions

View file

@ -914,6 +914,9 @@ various input values that the expression can access through
@code{ld(0)}. When the expression evaluates to 0 then the
corresponding input value will be returned.
@item round(expr)
Round the value of expression @var{expr} to the nearest integer. For example, "round(1.5)" is "2.0".
@item sin(x)
Compute sine of @var{x}.