mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
removed redundant math functions as jinja2 provides abs() and round()
already
This commit is contained in:
parent
6a3c26eb70
commit
b07ce8b942
2 changed files with 2 additions and 37 deletions
|
@ -318,19 +318,11 @@ Math
|
|||
--------------------
|
||||
.. versionadded:: 1.9
|
||||
|
||||
To get the absolute value of a number::
|
||||
|
||||
{{ -23 | abs }}
|
||||
|
||||
To see if something is actually a number::
|
||||
|
||||
{{ myvar | isnan }}
|
||||
|
||||
Rounding::
|
||||
|
||||
{{ myvar | ceil }}
|
||||
{{ myvar | floor }}
|
||||
|
||||
Get the logarithm (default is e)::
|
||||
|
||||
{{ myvar | log }}
|
||||
|
@ -349,6 +341,8 @@ Square root, or the 5th::
|
|||
{{ myvar | root }}
|
||||
{{ myvar | root(5) }}
|
||||
|
||||
Note that jinja2 already provides some like abs() and round().
|
||||
|
||||
|
||||
.. _other_useful_filters:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue