module Ephemeris::Zodiac::Aspect::Trine
Public Class Methods
build_appropriate_motion_from_position( position )
click to toggle source
# File lib/ephemeris/zodiac/aspect.rb, line 86 def self.build_appropriate_motion_from_position( position ) if (0...120).cover? position return [ 120, 240 ] elsif (120...240).cover? position return [ 120, -120 ] elsif (240...360).cover? position return [ -120, -240 ] else raise StandardError.new("There are only 360 degress in a circle, buddy.") end end
trine?( planet_1, planet_2 )
click to toggle source
# File lib/ephemeris/zodiac/aspect.rb, line 79 def self.trine?( 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