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

@@ -156,8 +156,8 @@ function SortWidget:init()
local padding = Size.padding.large
self.width_widget = self.dimen.w - 2 * padding
self.item_width = self.dimen.w - 2 * padding
self.footer_center_width = math.floor(self.width_widget * 22 / 100)
self.footer_button_width = math.floor(self.width_widget * 12 / 100)
self.footer_center_width = math.floor(self.width_widget * (22/100))
self.footer_button_width = math.floor(self.width_widget * (12/100))
self.item_height = Size.item.height_big
-- group for footer
local chevron_left = "chevron.left"