Mal:Precision1: Forskjell mellom sideversjoner
Hopp til navigering
Hopp til søk
imported>Quarl («new: +(107 words)» copy Template:Precision) |
imported>Quarl («102 words changed» 0..1 only) |
||
Linje 1: | Linje 1: | ||
<includeonly>{{#ifeq:{{{1}}}|0|0|{{#ifexpr: {{{1}}} round 0 = {{{1}}}|0|{{#ifexpr:{{{1}}} round 1 = {{{1}}}|1|2}}}}}}</includeonly><noinclude>{{template doc}}</noinclude> |
|||
<includeonly><!-- |
|||
-->{{#ifeq:{{{1}}}|0|0 |
|||
|{{#ifexpr: {{{1}}} round -8 = {{{1}}}|-8 |
|||
|{{#ifexpr: {{{1}}} round -7 = {{{1}}}|-7 |
|||
|{{#ifexpr: {{{1}}} round -6 = {{{1}}}|-6 |
|||
|{{#ifexpr: {{{1}}} round -5 = {{{1}}}|-5 |
|||
|{{#ifexpr: {{{1}}} round -4 = {{{1}}}|-4 |
|||
|{{#ifexpr: {{{1}}} round -3 = {{{1}}}|-3 |
|||
|{{#ifexpr: {{{1}}} round -2 = {{{1}}}|-2 |
|||
|{{#ifexpr: {{{1}}} round -1 = {{{1}}}|-1 |
|||
|{{#ifexpr: {{{1}}} round 0 = {{{1}}}|0 |
|||
|{{#ifexpr: {{{1}}} round 1 = {{{1}}}|1 |
|||
|{{#ifexpr: {{{1}}} round 2 = {{{1}}}|2 |
|||
|{{#ifexpr: {{{1}}} round 3 = {{{1}}}|3 |
|||
|{{#ifexpr: {{{1}}} round 4 = {{{1}}}|4 |
|||
|{{#ifexpr: {{{1}}} round 5 = {{{1}}}|5 |
|||
|{{#ifexpr: {{{1}}} round 6 = {{{1}}}|6 |
|||
|{{#ifexpr: {{{1}}} round 7 = {{{1}}}|7 |
|||
|{{#ifexpr: {{{1}}} round 8 = {{{1}}}|8 |
|||
|9}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}</includeonly><noinclude> |
|||
{{template doc}}</noinclude> |
Sideversjonen fra 8. apr. 2007 kl. 07:16
Maldokumentasjon
Formål
{{precision1}} er veldig lik {{precision}}, men "output range'n" er bare 0 til 6. Funksjonaliteten til {{precision1}} er uansett et subsett av funksjonaliteten til {{precision}}, men fordelen er at malkoden er mye kortere.
Bruk
Den er nyttig når man må være forsiktig med malgrenser.
== Eksempler ==-
{{Precision1|111.12345678}} |
2 |
{{Precision1|111.1234567}} |
2 |
{{Precision1|111.123456}} |
2 |
{{Precision1|111.12345}} |
2 |
{{Precision1|111.1234}} |
2 |
{{Precision1|111.123}} |
2 |
{{Precision1|111.12}} |
2 |
{{Precision1|111.1}} |
1 |
{{Precision1|111}} |
0 |
{{Precision1|110}} |
0 |
{{Precision1|100}} |
0 |
{{Precision1|111.10}} |
1 |
{{Precision1|111.100}} |
1 |
{{Precision1|111.1000}} |
1 |
Se også