def distance other, units = :km
        o = Itudes.new other
        raise ArgumentError.new "operand must be lat-/longitudable" if (o.latitude.nil? || o.longitude.nil?)

        dlat = Itudes.radians(o.latitude - @latitude)
        dlon = Itudes.radians(o.longitude - @longitude)
        lat1 = Itudes.radians(@latitude)
        lat2 = Itudes.radians(o.latitude);

        a = Math::sin(dlat/2)**2 + Math::sin(dlon/2)**2 * Math::cos(lat1) * Math::cos(lat2)
        (RADIUS[units] * 2.0 * Math::atan2(Math.sqrt(a), Math.sqrt(1-a))).abs
      end
def distance other, units = :km
        o = Itudes.new other
        raise ArgumentError.new "operand must be lat-/longitudable" if (o.latitude.nil? || o.longitude.nil?)

        dlat = Itudes.radians(o.latitude - @latitude)
        dlon = Itudes.radians(o.longitude - @longitude)
        lat1 = Itudes.radians(@latitude)
        lat2 = Itudes.radians(o.latitude);

        a = Math::sin(dlat/2)**2 + Math::sin(dlon/2)**2 * Math::cos(lat1) * Math::cos(lat2)
        (RADIUS[units] * 2.0 * Math::atan2(Math.sqrt(a), Math.sqrt(1-a))).abs
      end
Calculates distance between two points on the Earth.
 @param other the place on the Earth to calculate distance to
 @return [Float] the distance between two places on the Earth