Template:Floor

From Zoophilia Wiki
Revision as of 13:40, 24 April 2006 by meta>Verdy p (there's a bug for negative numbers, correcting and testing)
Jump to navigationJump to search

Implements the floor function.

Usage: {{floor|<value>}}.

Examples:

  • {{floor|3.9}} = {{#ifexpr:3.9=(3.9 round 0)|3.9|3.
  • {{floor|3.5}} = {{#ifexpr:3.5=(3.5 round 0)|3.5|3.
  • {{floor|3.1}} = {{#ifexpr:3.1=(3.1 round 0)|3.1|3.
  • {{floor|3.0}} = {{#ifexpr:3.0=(3.0 round 0)|3|3.
  • {{floor|1.0}} = {{#ifexpr:1.0=(1.0 round 0)|1|1.
  • {{floor|0.9}} = {{#ifexpr:0.9=(0.9 round 0)|0.9|0.
  • {{floor|0.5}} = {{#ifexpr:0.5=(0.5 round 0)|0.5|0.
  • {{floor|0.1}} = {{#ifexpr:0.1=(0.1 round 0)|0.1|-0.
  • {{floor|0.0}} = {{#ifexpr:0.0=(0.0 round 0)|0|-1.
  • {{floor|-0.1}} = {{#ifexpr:-0.1=(-0.1 round 0)|-0.1|-1.
  • {{floor|-0.5}} = {{#ifexpr:-0.5=(-0.5 round 0)|-0.5|-1.
  • {{floor|-0.9}} = {{#ifexpr:-0.9=(-0.9 round 0)|-0.9|-1.
  • {{floor|-1.0}} = {{#ifexpr:-1.0=(-1.0 round 0)|-1|-2.
  • {{floor|-3.0}} = {{#ifexpr:-3.0=(-3.0 round 0)|-3|-4.
  • {{floor|-3.2}} = {{#ifexpr:-3.2=(-3.2 round 0)|-3.2|-4.
  • {{floor|-3.5}} = {{#ifexpr:-3.5=(-3.5 round 0)|-3.5|-4.
  • {{floor|-3.9}} = {{#ifexpr:-3.9=(-3.9 round 0)|-3.9|-4.