1Template::Plugin::Math(U3s)er Contributed Perl DocumentatTieomnplate::Plugin::Math(3)
2
3
4

NAME

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

SYNOPSIS

9           [% USE Math %]
10
11           [% Math.sqrt(9) %]
12

DESCRIPTION

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

METHODS

18       "Template::Plugin::Math" makes available the following functions from
19       the Perl core:
20
21       abs
22       atan2
23       cos
24       exp
25       hex
26       int
27       log
28       oct
29       rand
30       sin
31       sqrt
32       srand
33
34       In addition, if the Math::Trig module can be loaded, the following
35       functions are also available:
36
37       pi
38       tan
39       csc
40       cosec
41       sec
42       cot
43       cotan
44       asin
45       acos
46       atan
47       acsc
48       acosec
49       asec
50       acot
51       acotan
52       sinh
53       cosh
54       tanh
55       csch
56       cosech
57       sech
58       coth
59       cotanh
60       asinh
61       acosh
62       atanh
63       acsch
64       acosech
65       asech
66       acoth
67       acotanh
68       rad2deg
69       rad2grad
70       deg2rad
71       deg2grad
72       grad2rad
73       grad2deg
74
75       If the Math::TrulyRandom module is available, and you've got the time
76       to wait, the "truly_random_number" method is available:
77
78           [% Math.truly_random_number %]
79

AUTHOR

81       Andy Wardley <abw@wardley.org> <http://wardley.org/>
82
84       Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.
85
86       This module is free software; you can redistribute it and/or modify it
87       under the same terms as Perl itself.
88

SEE ALSO

90       Template::Plugin
91
92
93
94perl v5.34.0                      2022-01-21         Template::Plugin::Math(3)
Impressum