Class: EhbGameLib::Math::Intersection::CircleLine
- Inherits:
-
Object
- Object
- EhbGameLib::Math::Intersection::CircleLine
- Defined in:
- lib/ehb_game_lib/math/intersection/circle_line.rb
Instance Method Summary collapse
-
#initialize(circle, line) ⇒ CircleLine
constructor
A new instance of CircleLine.
- #intersect? ⇒ Boolean
- #intersection ⇒ Object
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
16 17 18 |
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 16 def intersect? !intersection.empty? end |
#intersection ⇒ Object
12 13 14 |
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 12 def intersection @intersection ||= intersection_uncached end |