You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Nathan Barron <na...@Rightmove.co.uk> on 2002/09/13 17:36:00 UTC
Math functions
Guys
I am trying to obtain a random number from within my velocity macros. Is
there a function I can use to generate a random number without having to
push a random number into the context from a Java file.
I am looking for a function like $!Math.random()
Any help would be much appreciated
Nathan Barron
Nathan Barron
Java Developer
rightmove.co.uk
Room 8, Glen House,
Stag Place, London, SW1E 5AG
n Email: nathan.barron@rightmove.co.uk
<ma...@rightmove.co.uk>
n Tel: 020 7821 9673
n Mob: 07779 020 559
n Fax: 020 7821 9684
The information in this email and any documents and files transmitted with
it are confidential and for the use of the intended recipient only. If you
are not the intended recipient, please delete the message and statements
immediately and notify the sender. Any unauthorised dissemination or copying
of this email, or any misuse or wrongful disclosure of the information
contained in it, is strictly prohibited and may be illegal. The opinions,
statements and thoughts expressed in this email and its attachments if any
are those of the individual sender and not necessarily rightmove.co.uk or
any associated personnel. Although rightmove.co.uk believes this email and
any attachments are free of any virus or other defect which may affect a
computer, it is the responsibility of the recipient to ensure that it is
virus free and rightmove.co.uk does not accept any responsibility for any
loss or damage arising in any way from its use.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service.
________________________________________________________________________
Re: Math functions
Posted by Denis <ji...@respublica.fr>.
Look into the tools
http://cvs.apache.org/viewcvs/jakarta-velocity-
tools/tools/src/java/org/apache/velocity/tools/tools/
There is a MathTool that provides the random function you need.
Cheers,
-- Denis.
On Friday, September 13, 2002, at 04:36 pm, Nathan Barron wrote:
> Guys
>
> I am trying to obtain a random number from within my velocity
> macros. Is
> there a function I can use to generate a random number without
> having to
> push a random number into the context from a Java file.
> I am looking for a function like $!Math.random()
>
> Any help would be much appreciated
>
> Nathan Barron
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>