साँचा:Roundup/doc
नेविगेशन पर जाएँ
खोज पर जाएँ
This template rounds up a numeric value to a limited number of decimal places.
- Usage:
- {{Roundup|value}}
- {{Roundup|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.
- Examples:
- {{Roundup|3.14159|3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["।
- {{Roundup|0|3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be 0, not 0.001)
- {{Roundup|-0.00031|3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be -0.001, not 0)
- {{Roundup|-3.14159|3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["।
- {{Roundup|0|0}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be 0, not 1)
- {{Roundup|-0.9|0}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be -1, not 0)
- {{Roundup|314159|-3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["।
- {{Roundup|0|-3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be 0, not 1000)
- {{Roundup|-514.15|-3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be -1000, not 0)
- {{Roundup|-514159|-3}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["।
- {{Roundup|1}} = एक्स्प्रेशन त्रुटि: अनपेक्षित उद्गार चिन्ह "["। (should be 1, not 2)
- Note:
- {{Ceil|value}} is equivalent to {{Roundup|value}}.
- See also: