Template:Floor: Difference between revisions

From Vigyanwiki
Template>Verdy p
m (there's another bug for positive numbers near 0, correcting and testing)
m (64 revisions imported from alpha:Template:Floor)
 
(60 intermediate revisions by 27 users not shown)
Line 1: Line 1:
<includeonly>{{#ifexpr:({{{1}}})=(({{{1}}})round 0)|{{#expr:({{{1}}})+0}}|{{#ifexpr:({{{1}}})>0 and ({{{1}}})<1|0|{{#expr:(({{{1}}})-0.5)round 0}}}}}}</includeonly><noinclude>
<span style="font-size:{{{2|1em}}}">⌊</span>{{{1}}}<span style="font-size:{{{2|1em}}}">⌋</span><noinclude>{{Documentation|content=
Implements the [[floor function]].
== Description ==
Displays the parameter wrapped in floor symbols. This template is for display, not calculation.


Usage: <nowiki>{{floor|<value>}}</nowiki>.
== Examples ==
{{demo|<nowiki>{{floor|45.23}}</nowiki>}}
{{demo|<nowiki>{{floor|''x''}}</nowiki>}}
{{demo|<nowiki>{{floor|{{sfrac|2''a''|''b''}}}}</nowiki>}}
{{demo|<nowiki>{{floor|{{sfrac|2''a''|''b''}}|2em}}</nowiki>}}
{{demo|<nowiki>{{floor|{{sfrac|2''a''|''b''}}|larger}}</nowiki>}}
{{demo|<nowiki>{{floor|{{sfrac|2''a''|''b''}}|large}}</nowiki>}}
{{demo|<nowiki>{{math|{{floor|{{sfrac|2''a''|''b''}}}}}}</nowiki>}}
{{demo|<nowiki>{{bigmath|{{floor|{{sfrac|2''a''|''b''}}}}}}</nowiki>}}


Examples:
== See also ==
* <nowiki>{{floor|3.9}}</nowiki> = {{floor|3.9}}.
{{Math templates|notation}}
* <nowiki>{{floor|3.5}}</nowiki> = {{floor|3.5}}.
* <nowiki>{{floor|3.1}}</nowiki> = {{floor|3.1}}.
* <nowiki>{{floor|3.0}}</nowiki> = {{floor|3.0}}.
* <nowiki>{{floor|1.0}}</nowiki> = {{floor|1.0}}.
* <nowiki>{{floor|0.9}}</nowiki> = {{floor|0.9}}.
* <nowiki>{{floor|0.5}}</nowiki> = {{floor|0.5}}.
* <nowiki>{{floor|0.1}}</nowiki> = {{floor|0.1}}.
* <nowiki>{{floor|0.0}}</nowiki> = {{floor|0.0}}.
* <nowiki>{{floor|-0.1}}</nowiki> = {{floor|-0.1}}.
* <nowiki>{{floor|-0.5}}</nowiki> = {{floor|-0.5}}.
* <nowiki>{{floor|-0.9}}</nowiki> = {{floor|-0.9}}.
* <nowiki>{{floor|-1.0}}</nowiki> = {{floor|-1.0}}.
* <nowiki>{{floor|-3.0}}</nowiki> = {{floor|-3.0}}.
* <nowiki>{{floor|-3.2}}</nowiki> = {{floor|-3.2}}.
* <nowiki>{{floor|-3.5}}</nowiki> = {{floor|-3.5}}.
* <nowiki>{{floor|-3.9}}</nowiki> = {{floor|-3.9}}.


[[Category:Templates using ParserFunctions]]
[[Category:Mathematical formatting templates]]
[[Category:Mathematical templates]]
}}</noinclude>
</noinclude>

Latest revision as of 10:24, 17 March 2023

{{{1}}}

Template documentation

Description

Displays the parameter wrapped in floor symbols. This template is for display, not calculation.

Examples

Template:Demo Template:Demo Template:Demo Template:Demo Template:Demo Template:Demo Template:Demo Template:Demo

See also

[[Category:Template documentation pages{{#translation:}}]]