Sha256: a7f6fb9a004e29e86737b399d44f1e29193bc8dedb36080cb1aacea02e285303

Contents?: true

Size: 243 Bytes

Versions: 3

Compression:

Stored size: 243 Bytes

Contents

# -*- coding: utf-8 -*-

##
# Indexable #pitch method.
#
module Indexable
  module Pitch

    # Calculate the xy-plane angle to the z-coordinate.
    def pitch
      Math::atan2(self[2], Math::sqrt(self[0]**2 + self[1]**2))
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sixarm_ruby_geometry-4.0.0 lib/sixarm_ruby_geometry/indexable/pitch.rb
sixarm_ruby_geometry-3.1.1 lib/sixarm_ruby_geometry/indexable/pitch.rb
sixarm_ruby_geometry-3.0.0 lib/sixarm_ruby_geometry/indexable/pitch.rb