Functions for Math

"It's still web development, it's just way easier!"

Math

  • <#number = 1.2>
  • <#recur = 1.6666666>
  • <#half = 0.5>
Type Description Example Result
Ceiling Convert to an integer by rounding up to a whole number. <#number:ceiling> 2
Commas Put commas into large numbers. Use only as the last function to format a number. <#-1000000.1:commas> -1,000,000.1
Floor Convert to an integer by rounding down to a whole number. <#recur:floor> 1
Price Convert to a traditional price value (forces a format of: x.xx - x.xxxx). <#half:price> 0.50
Round Round to the nearest whole number. <#recur:round> 2
Round="" Round to the depth of the value passed. <#recur:round="3"> 1.667