Difference between revisions of "Template:SI prefix"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "<includeonly>{{#switch: {{#ifexpr: {{{1}}}<1e-9|-9|{{#ifexpr: {{{1}}}>1e12|12|{{#expr: floor(ln {{{1}}}/ln 10)}}}}}} |-9 |-8 |-7 = {{#expr: {{{1}}}*1000000000 round {{{2|2}}}}...")
 
m (!shifted k,M,G,T;)
Line 9: Line 9:
 
|-2 = {{#expr: {{{1}}}*100 round {{{2|2}}}}}&nbsp;{{Dict|c}}
 
|-2 = {{#expr: {{{1}}}*100 round {{{2|2}}}}}&nbsp;{{Dict|c}}
 
|-1 = {{#expr: {{{1}}}*10 round {{{2|2}}}}}&nbsp;{{Dict|d}}
 
|-1 = {{#expr: {{{1}}}*10 round {{{2|2}}}}}&nbsp;{{Dict|d}}
| 0 = {{#expr: {{{1}}} round {{{2|2}}}}}&nbsp;
+
| 0
 
| 1
 
| 1
| 2
+
| 2 = {{#expr: {{{1}}} round {{{2|2}}}}}&nbsp;
| 3 = {{#expr: {{{1}}}/1000 round {{{2|2}}}}}&nbsp;{{Dict|k}}
+
| 3
 
| 4
 
| 4
| 5
+
| 5 = {{#expr: {{{1}}}/1000 round {{{2|2}}}}}&nbsp;{{Dict|k}}
| 6 = {{#expr: {{{1}}}/1000000 round {{{2|2}}}}}&nbsp;{{Dict|M}}
+
| 6
 
| 7
 
| 7
| 8
+
| 8 = {{#expr: {{{1}}}/1000000 round {{{2|2}}}}}&nbsp;{{Dict|M}}
| 9 = {{#expr: {{{1}}}/1000000000 round {{{2|2}}}}}&nbsp;{{Dict|G}}
+
| 9
 
|10
 
|10
|11
+
|11 = {{#expr: {{{1}}}/1000000000 round {{{2|2}}}}}&nbsp;{{Dict|G}}
 
|12 = {{#expr: {{{1}}}/1000000000000 round {{{2|2}}}}}&nbsp;{{Dict|T}}
 
|12 = {{#expr: {{{1}}}/1000000000000 round {{{2|2}}}}}&nbsp;{{Dict|T}}
 
}}</includeonly><noinclude>Returns the value with the corresponding SI prefix. Only the unit needs to be added. Supports the prefixes from <tt>nano</tt> (10⁻⁹) to <tt>tera</tt> (10⁺¹²), except deca (10¹) and hecto (10²). It round to the number of places given in the second parameter which defaults to 2.
 
}}</includeonly><noinclude>Returns the value with the corresponding SI prefix. Only the unit needs to be added. Supports the prefixes from <tt>nano</tt> (10⁻⁹) to <tt>tera</tt> (10⁺¹²), except deca (10¹) and hecto (10²). It round to the number of places given in the second parameter which defaults to 2.
  
 
[[Category:Calculating templates‎]]</noinclude>
 
[[Category:Calculating templates‎]]</noinclude>

Revision as of 23:59, 20 April 2014

Returns the value with the corresponding SI prefix. Only the unit needs to be added. Supports the prefixes from nano (10⁻⁹) to tera (10⁺¹²), except deca (10¹) and hecto (10²). It round to the number of places given in the second parameter which defaults to 2.