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

NAME

6       Template::Plugin::Math - Plugin interface to mathematical functions
7

NAME

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

SYNOPSIS

12           [% USE Math %]
13
14           [% Math.sqrt(9) %]
15

DESCRIPTION

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

METHODS

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

AUTHOR

84       Andy Wardley <abw@wardley.org>
85
86       <http://wardley.org/http://wardley.org/>
87

VERSION

89       1.16, distributed as part of the Template Toolkit version 2.18,
90       released on 09 February 2007.
91
93         Copyright (C) 1996-2007 Andy Wardley.  All Rights Reserved.
94
95       This module is free software; you can redistribute it and/or modify it
96       under the same terms as Perl itself.
97

SEE ALSO

99       Template::Plugin
100
101
102
103perl v5.8.8                       2007-02-09         Template::Plugin::Math(3)
Impressum