Şablon:Yukarı yuvarla/belge

Vikipedi, özgür ansiklopedi
(Şablon:Roundup/belge sayfasından yönlendirildi)

This template rounds up a numeric value to a limited number of decimal places.

Kullanım:
  • {{Yukarı yuvarla|değer}}
  • {{Yukarı yuvarla|value|decimals}}
  • Both parameters can be any valid numeric expression.
  • The decimals parameter defaults to 0 and is rounded to the nearest integer.
  • decimals can be negative to round up to a multiple of a power of ten.
  • If decimals is not between -20 and 20, the value is returned without rounding.
Örnekler:
  • {{Yukarı yuvarla|3.14159|3}} = 3.142
  • {{Yukarı yuvarla|0|3}} = 0 (should be 0, not 0.001)
  • {{Yukarı yuvarla|-0.00031|3}} = 0 (should be -0.001, not 0)
  • {{Yukarı yuvarla|-3.14159|3}} = -3.141
  • {{Yukarı yuvarla|0|0}} = 0 (should be 0, not 1)
  • {{Yukarı yuvarla|-0.9|0}} = 0 (should be -1, not 0)
  • {{Yukarı yuvarla|314159|-3}} = 315000
  • {{Yukarı yuvarla|0|-3}} = 0 (should be 0, not 1000)
  • {{Yukarı yuvarla|-514.15|-3}} = 0 (should be -1000, not 0)
  • {{Yukarı yuvarla|-514159|-3}} = -514000
  • {{Yukarı yuvarla|1}} = 1 (should be 1, not 2)
Note:
  • {{Ceil|value}} is equivalent to {{Yukarı yuvarla|value}}.
See also: