Class: Fusuma::Plugin::Detectors::PinchDetector::Quantity
- Inherits:
-
Object
- Object
- Fusuma::Plugin::Detectors::PinchDetector::Quantity
- Defined in:
- lib/fusuma/plugin/detectors/pinch_detector.rb
Overview
quantity of gesture
Instance Method Summary collapse
- #calc ⇒ Object
-
#initialize(diameter:) ⇒ Quantity
constructor
A new instance of Quantity.
- #to_f ⇒ Object
Constructor Details
#initialize(diameter:) ⇒ Quantity
Returns a new instance of Quantity.
126 127 128 |
# File 'lib/fusuma/plugin/detectors/pinch_detector.rb', line 126 def initialize(diameter:) @diameter = diameter end |
Instance Method Details
#calc ⇒ Object
134 135 136 |
# File 'lib/fusuma/plugin/detectors/pinch_detector.rb', line 134 def calc (1.0 - @diameter).abs end |
#to_f ⇒ Object
130 131 132 |
# File 'lib/fusuma/plugin/detectors/pinch_detector.rb', line 130 def to_f calc.to_f end |