Class: Geodesics::Radian

Inherits:
Point
  • Object
show all
Defined in:
lib/geodesics/point.rb

Constant Summary

Constants inherited from Point

Point::DEGREE, Point::RADIAN

Instance Attribute Summary

Attributes inherited from Point

#latitude, #longitude

Instance Method Summary collapse

Methods inherited from Point

#initialize, #to_radian

Constructor Details

This class inherits a constructor from Geodesics::Point

Instance Method Details

#==(other) ⇒ Object



33
34
35
# File 'lib/geodesics/point.rb', line 33

def ==(other)
  other.is_a?(Degree) ? super(other.to_radian) : super
end

#to_degreeObject



29
30
31
# File 'lib/geodesics/point.rb', line 29

def to_degree
  Degree.new(@latitude * DEGREE, @longitude * DEGREE)
end