Module: Ephemeris::Zodiac::Aspect::Square
- Defined in:
- lib/ephemeris/zodiac/aspect.rb
Class Method Summary collapse
Class Method Details
.build_appropriate_motion_from_position(position) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 |
# 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) ⇒ Boolean
58 59 60 61 62 63 |
# 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 |