Opened 3 years ago
Last modified 3 years ago
#32955 closed Bug
widthratio does not round properly — at Version 1
Reported by: | alfonsrv | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The documentation states, quote
175/200 = .875; .875 * 100 = 87.5 which is rounded up to 88
Using the example provided in the official documentation produces 88px. However when dividing 5/2, it results in 2 instead of what I would expect to be 3.
{% widthratio 5 2 1 as width %} The width is: {{ width }} {# results in 2 instead of 3 #}
When using 7 instead of 5, the width results in the expected 4.
Note:
See TracTickets
for help on using tickets.