logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Template::Plugin::Math - Plugin providing mathematical functions

Author

Description

       The Math plugin provides numerous mathematical functions for use within templates.

Methods

       "Template::Plugin::Math" makes available the following functions from the Perl core:

       abs
       atan2
       cos
       exp
       hex
       int
       log
       oct
       rand
       sin
       sqrt
       srand

       In addition, if the Math::Trig module can be loaded, the following functions are also available:

       pi
       tan
       csc
       cosec
       sec
       cot
       cotan
       asin
       acos
       atan
       acsc
       acosec
       asec
       acot
       acotan
       sinh
       cosh
       tanh
       csch
       cosech
       sech
       coth
       cotanh
       asinh
       acosh
       atanh
       acsch
       acosech
       asech
       acoth
       acotanh
       rad2deg
       rad2grad
       deg2rad
       deg2grad
       grad2rad
       grad2deg

       If  the Math::TrulyRandom module is available, and you've got the time to wait, the "truly_random_number"
       method is available:

           [% Math.truly_random_number %]

Name

       Template::Plugin::Math - Plugin providing mathematical functions

See Also

       Template::Plugin

perl v5.40.0                                       2024-10-20                        Template::Plugin::Math(3pm)

Synopsis

           [% USE Math %]

           [% Math.sqrt(9) %]

See Also