Class: Fusuma::Plugin::Detectors::RotateDetector::Quantity

Inherits:
Object
  • Object
show all
Defined in:
lib/fusuma/plugin/detectors/rotate_detector.rb

Overview

quantity of gesture

Instance Method Summary collapse

Constructor Details

#initialize(angle:) ⇒ Quantity

Returns a new instance of Quantity.



157
158
159
# File 'lib/fusuma/plugin/detectors/rotate_detector.rb', line 157

def initialize(angle:)
  @angle = angle.abs
end

Instance Method Details

#to_fObject



161
162
163
# File 'lib/fusuma/plugin/detectors/rotate_detector.rb', line 161

def to_f
  @angle.to_f
end