Ticket #3176: docs.templates.txt.patch
File docs.templates.txt.patch, 1.3 KB (added by , 18 years ago) |
---|
-
docs/templates.txt
924 924 floatformat 925 925 ~~~~~~~~~~~ 926 926 927 Rounds a floating-point number to one decimal place -- but only if there's a 928 decimal part to be displayed. For example:927 When used without an argument, rounds a floating-point number to one decimal 928 place -- but only if there's a decimal part to be displayed. For example: 929 929 930 930 * ``36.123`` gets converted to ``36.1`` 931 931 * ``36.15`` gets converted to ``36.2`` 932 932 * ``36`` gets converted to ``36`` 933 933 934 If used with a numeric integer argument, always rounds a number to that many 935 decimal places. For example: 936 937 * ``36.1234`` with floatformat:3 gets converted to ``36.123`` 938 * ``36`` with floatformat:4 gets converted to ``36.0000`` 939 940 If the argument passed to floatformat is negative, it will round a number to 941 that many decimal places -- but only if there's a decimal part to be displayed. 942 For example: 943 944 * ``36.1234`` with floatformat:-3 gets converted to ``36.123`` 945 * ``36`` with floatformat:-4 gets converted to ``36`` 946 947 Using floatformat with no argument is equivalent to using floatformat with an 948 argument of ``-1``. 949 934 950 get_digit 935 951 ~~~~~~~~~ 936 952