Module: Indexable::Pitch

Defined in:
lib/sixarm_ruby_geometry/indexable/pitch.rb

Instance Method Summary collapse

Instance Method Details

#pitchObject

Calculate the xy-plane angle to the z-coordinate.



10
11
12
# File 'lib/sixarm_ruby_geometry/indexable/pitch.rb', line 10

def pitch
  Math::atan2(self[2], Math::sqrt(self[0]**2 + self[1]**2))
end