Class: Geodesics::Degree

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_degree

Constructor Details

This class inherits a constructor from Geodesics::Point

Instance Method Details

#==(other) ⇒ Object



43
44
45
# File 'lib/geodesics/point.rb', line 43

def ==(other)
  other.is_a?(Radian) ? super(other.to_degree) : super
end

#to_radianObject



39
40
41
# File 'lib/geodesics/point.rb', line 39

def to_radian
  Radian.new(@latitude * RADIAN, @longitude * RADIAN)
end