Ticket #231 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

expand the list of default template functions

Reported by: karel Owned by: jgou
Priority: minor Milestone: 0.4
Component: modules/kauri-template Version: trunk
Keywords: Cc:

Description

While most of these can be achieved in other ways (certainly if you take groovy into account), it's not always trivial:

math:floor(n). use case: ${math:floor(5/2)} --> 2 (Currently, ${(5/2).intValue()} as a good alternative)
math:ceil(n)
math:random()
math:abs()
math:pow(a,b)
math:tan(n)
math:log(n)
math:log(n,base)
etc.

txt:indexOf(a,b) (not very useful, ${a.indexOf(b)} is quite intuitive)

Change History

comment:1 Changed 3 years ago by jgou

  • Owner changed from mpo to jgou
  • Status changed from new to assigned
  • Component changed from -- unknown -- to modules/kauri-template

I suggest adding all java.lang.Math functions.

comment:2 Changed 3 years ago by jgou

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [1549]) make all java.lang.Math functions available in our template EL ; fixes #231

Note: See TracTickets for help on using tickets.