Sha256: caaafdcffedd2598115a95a6020cf504479bfc11f3931c08282886679ae3e1b9

Contents?: true

Size: 193 Bytes

Versions: 3

Compression:

Stored size: 193 Bytes

Contents

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

##
# Indexable #rad method.
#
module Indexable
  module Rad

    # Calculate the xy angle in radians.
    def rad
      Math::atan2(self[1],self[0])
    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/rad.rb
sixarm_ruby_geometry-3.1.1 lib/sixarm_ruby_geometry/indexable/rad.rb
sixarm_ruby_geometry-3.0.0 lib/sixarm_ruby_geometry/indexable/rad.rb