Difference between revisions of "Template:Max/doc"

From blackwiki
Jump to navigation Jump to search
imported>Ribbitmadness1
imported>Colonies Chris
(minor fixes)
 
(42 intermediate revisions by 35 users not shown)
Line 1: Line 1:
 +
{{documentation subpage}}
 +
{{high-use|230,000+}}
 +
{{lua|Module:Math}}
  
== The Life Of BOB Baltimore.(:'''I'm Bob Ribbit Baltimore. I enjoy swimming and eating a lot. I hate the winter time, and to this day, I live with my mom. I have fungus in places it shouldn't be, and I enjoy dressing up in women's clothing. I don't know what I'm doing with my life, and I'm still in the 4th grade. I'm 45. Marry ME?'''
+
Evaluates and returns the maximum of a list of numeric values. The parameters can be numeric expressions that will be evaluated. Empty or missing parameters are ignored.
 +
 
 +
=== Usage ===
 +
 
 +
; Syntax
 +
:<code><nowiki>{{max | value1 | value2 | value3 | value4 | ... }}</nowiki></code>
 +
 
 +
; Examples
 +
: <code><nowiki>{{max}}</nowiki></code> → {{max}}
 +
: <code><nowiki>{{max|}}</nowiki></code> → {{max|}}
 +
: <code><nowiki>{{max|-7}}</nowiki></code> → {{max|-7}}
 +
: <code><nowiki>{{max|-7|}}</nowiki></code> → {{max|-7|}}
 +
: <code><nowiki>{{max|-7|5}}</nowiki></code> → {{max|-7|5}}
 +
: <code><nowiki>{{max|-7|5|}}</nowiki></code> → {{max|-7|5|}}
 +
: <code><nowiki>{{max|-7|5|8}}</nowiki></code> → {{max|-7|5|8}}
 +
: <code><nowiki>{{max|40*41|300+30}}</nowiki></code> → {{max|40*41|300+30}}
 +
: <code><nowiki>{{max|100+10|300+30|200+20}}</nowiki></code> → {{max|100+10|300+30|200+20}}
 +
 
 +
=== TemplateData===
 +
{{TemplateData header}}
 +
<templatedata>{
 +
"description": "Evaluates and returns the maximum of a list of numeric values.",
 +
"params": {
 +
  "1": {
 +
    "label": "First value",
 +
    "description": "The first value, a number or expression, e.g. '10*20+30'",
 +
    "type": "string",
 +
    "required": true
 +
  },
 +
  "2": {
 +
    "label": "Second value",
 +
    "description": "The second value, many more parameters can be specified",
 +
    "type": "string",
 +
    "required": false
 +
  }
 +
}}</templatedata>
 +
 
 +
=== See also ===
 +
* [[Template:Min]] - for a minimum value, used the same way.
 +
 
 +
<includeonly>{{Sandbox other||
 +
[[Category:Mathematical function templates|Max]]
 +
 
 +
}}</includeonly>

Latest revision as of 17:52, 28 August 2020

Evaluates and returns the maximum of a list of numeric values. The parameters can be numeric expressions that will be evaluated. Empty or missing parameters are ignored.

Usage

Syntax
{{max | value1 | value2 | value3 | value4 | ... }}
Examples
{{max}}
{{max|}}
{{max|-7}} → -7
{{max|-7|}} → -7
{{max|-7|5}} → 5
{{max|-7|5|}} → 5
{{max|-7|5|8}} → 8
{{max|40*41|300+30}} → 1640
{{max|100+10|300+30|200+20}} → 330

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Max

Evaluates and returns the maximum of a list of numeric values.

Template parameters

ParameterDescriptionTypeStatus
First value1

The first value, a number or expression, e.g. '10*20+30'

Stringrequired
Second value2

The second value, many more parameters can be specified

Stringoptional

See also