class Fusuma::Plugin::Detectors::PinchDetector::Quantity
quantity of gesture
Public Class Methods
new(target:, base:)
click to toggle source
# File lib/fusuma/plugin/detectors/pinch_detector.rb, line 166 def initialize(target:, base:) @target = target.to_f @base = base.to_f end
Public Instance Methods
calc()
click to toggle source
# File lib/fusuma/plugin/detectors/pinch_detector.rb, line 175 def calc if @target > @base @target / @base else @base / @target end end
to_f()
click to toggle source
# File lib/fusuma/plugin/detectors/pinch_detector.rb, line 171 def to_f calc.to_f end