summaryrefslogtreecommitdiffstats
path: root/doc/eval.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/eval.texi')
-rw-r--r--doc/eval.texi30
1 files changed, 29 insertions, 1 deletions
diff --git a/doc/eval.texi b/doc/eval.texi
index 7d8106b..18d8487 100644
--- a/doc/eval.texi
+++ b/doc/eval.texi
@@ -1,7 +1,7 @@
@chapter Expression Evaluation
@c man begin EXPRESSION EVALUATION
-When evaluating an arithemetic expression, Libav uses an internal
+When evaluating an arithemetic expression, FFmpeg uses an internal
formula evaluator, implemented through the @file{libavutil/eval.h}
interface.
@@ -79,6 +79,34 @@ Compute the square root of @var{expr}. This is equivalent to
@item not(expr)
Return 1.0 if @var{expr} is zero, 0.0 otherwise.
+
+@item pow(x, y)
+Compute the power of @var{x} elevated @var{y}, it is equivalent to
+"(@var{x})^(@var{y})".
+
+@item random(x)
+Return a pseudo random value between 0.0 and 1.0. @var{x} is the index of the
+internal variable which will be used to save the seed/state.
+
+@item hypot(x, y)
+This function is similar to the C function with the same name; it returns
+"sqrt(@var{x}*@var{x} + @var{y}*@var{y})", the length of the hypotenuse of a
+right triangle with sides of length @var{x} and @var{y}, or the distance of the
+point (@var{x}, @var{y}) from the origin.
+
+@item gcd(x, y)
+Return the greatest common divisor of @var{x} and @var{y}. If both @var{x} and
+@var{y} are 0 or either or both are less than zero then behavior is undefined.
+@end table
+
+The following constants are available:
+@table @option
+@item PI
+area of the unit disc, approximatively 3.14
+@item E
+exp(1) (Euler's number), approximatively 2.718
+@item PHI
+golden ratio (1+sqrt(5))/2, approximatively 1.618
@end table
Note that:
OpenPOWER on IntegriCloud