Optimization: Use constant folding for divisions not a power of two (#9609)

This commit is contained in:
zwim
2022-10-10 22:21:27 +02:00
committed by GitHub
parent a24548ed3f
commit 4969811c08
40 changed files with 118 additions and 118 deletions

View File

@@ -25,7 +25,7 @@ local function convertSizeTo(px, format)
local format_factor = 1 -- we are defaulting on mm
if format == "pt" then
format_factor = format_factor * 2660 / 1000 -- see https://www.wikiwand.com/en/Metric_typographic_units
format_factor = format_factor * (2660 / 1000) -- see https://www.wikiwand.com/en/Metric_typographic_units
elseif format == "in" then
format_factor = 1 / 25.4
end