class Fusuma::Plugin::Detectors::SwipeDetector::Quantity
quantity of gesture
Public Class Methods
new(move_x:, move_y:)
click to toggle source
# File lib/fusuma/plugin/detectors/swipe_detector.rb, line 160 def initialize(move_x:, move_y:) @x = move_x.to_f.abs @y = move_y.to_f.abs end
Public Instance Methods
calc()
click to toggle source
# File lib/fusuma/plugin/detectors/swipe_detector.rb, line 169 def calc @x > @y ? @x.abs : @y.abs end
to_f()
click to toggle source
# File lib/fusuma/plugin/detectors/swipe_detector.rb, line 165 def to_f calc.to_f end