module Ephemeris::Zodiac::Aspect::Sextile

Public Class Methods

build_appropriate_motion_from_position( position ) click to toggle source
# File lib/ephemeris/zodiac/aspect.rb, line 107
def self.build_appropriate_motion_from_position( position )
  if (0...60).cover? position
    return [ 60, 300 ]
  elsif (60...300).cover? position
    return [ -60, 60 ]
  elsif (240...360).cover? position
    return [ -60, -300 ]
  else
    raise StandardError.new("There are only 360 degress in a circle, buddy.")
  end
end
sextile?( planet_1, planet_2 ) click to toggle source
# File lib/ephemeris/zodiac/aspect.rb, line 100
def self.sextile?( planet_1, planet_2 )
  orb = Ephemeris::Zodiac::Aspect.orb_range_defined_by_target( planet_1, planet_2 )
  calc = self.build_appropriate_motion_from_position( orb.target.position )

  orb.cover?( calc ) # already an array
end