Open 892768447 opened 3 years ago
https://github.com/steveire/grantlee/blob/master/templates/defaulttags/widthratio.cpp#L75
test on {% widthratio 2 1 0.5 %}
I think it will return 1, but it returns 2
Grantlee::Context context; context.insert("DPI", 0.5); Grantlee::Engine engine; Grantlee::Template tpl = engine.newTemplate("{width: {% widthratio 2 1 DPI %};}", "style"); qInfo() << 2 * 0.5 << int(2 * 0.5); qInfo() << tpl->render(&context);
Output: 1 1 "{width: 2;}"
https://github.com/steveire/grantlee/blob/master/templates/defaulttags/widthratio.cpp#L75
test on {% widthratio 2 1 0.5 %}
I think it will return 1, but it returns 2
Output: 1 1 "{width: 2;}"