mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Optimization: Use constant folding for divisions not a power of two (#9609)
This commit is contained in:
@@ -2022,8 +2022,8 @@ end
|
||||
function ReaderHighlight:onMoveHighlightIndicator(args)
|
||||
if self.view.visible_area and self._current_indicator_pos then
|
||||
local dx, dy, quick_move = unpack(args)
|
||||
local quick_move_distance_dx = self.view.visible_area.w / 5 -- quick move distance: fifth of visible_area
|
||||
local quick_move_distance_dy = self.view.visible_area.h / 5
|
||||
local quick_move_distance_dx = self.view.visible_area.w * (1/5) -- quick move distance: fifth of visible_area
|
||||
local quick_move_distance_dy = self.view.visible_area.h * (1/5)
|
||||
-- single move distance, small and capable to move on word with small font size and narrow line height
|
||||
local move_distance = Size.item.height_default / 4
|
||||
local rect = self._current_indicator_pos:copy()
|
||||
|
||||
Reference in New Issue
Block a user