Optimization: Use constant folding for divisions not a power of two (#9609)
This commit is contained in:
40 files changed
+118
-118
No files matched your search
@@ -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