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.



7
8
9
10
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 7

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

Instance Method Details

#intersect?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 16

def intersect?
  !intersection.empty?
end

#intersectionObject



12
13
14
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 12

def intersection
  @intersection ||= intersection_uncached
end