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:
@@ -40,8 +40,8 @@ function ReaderPanning:onPanning(args, _)
|
||||
local dx, dy = unpack(args)
|
||||
-- for now, bounds checking/calculation is done in the view
|
||||
self.view:PanningUpdate(
|
||||
dx * self.panning_steps.normal * self.dimen.w / 100,
|
||||
dy * self.panning_steps.normal * self.dimen.h / 100)
|
||||
dx * self.panning_steps.normal * self.dimen.w * (1/100),
|
||||
dy * self.panning_steps.normal * self.dimen.h * (1/100))
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user