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