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.
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
14 15 16 |
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 14 def intersect? !intersection.empty? end |
#intersection ⇒ Object
10 11 12 |
# File 'lib/ehb_game_lib/math/intersection/circle_line.rb', line 10 def intersection @intersection ||= intersection_uncached end |