Class: EhbGameLib::Math::Intersection::CircleLine

Inherits:
Object
  • Object
show all
Defined in:
lib/ehb_game_lib/math/intersection/circle_line.rb

Instance Method Summary collapse

Constructor Details

#initialize(circle, line) ⇒ CircleLine

Returns a new instance of CircleLine.



5
6
7
8
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 5

def initialize(circle, line)
  @circle = circle
  @line = line
end

Instance Method Details

#intersect?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 14

def intersect?
  !intersection.empty?
end

#intersectionObject



10
11
12
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 10

def intersection
  @intersection ||= intersection_uncached
end