GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Template::Plugin::Math(3) User Contributed Perl Documentation Template::Plugin::Math(3)

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

    [% USE Math %]

    [% Math.sqrt(9) %]

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

"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 %]

Andy Wardley <abw@wardley.org> <http://wardley.org/>

Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Template::Plugin
2021-12-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.