Class: Geometry::ThreePointArc
Instance Attribute Summary collapse
-
#center ⇒ Object
readonly
Returns the value of attribute center.
-
#end ⇒ Object
(also: #last)
readonly
Returns the value of attribute end.
-
#start ⇒ Object
(also: #first)
readonly
Returns the value of attribute start.
Attributes inherited from Arc
#end_angle, #radius, #start_angle
Instance Method Summary collapse
Methods inherited from Arc
Methods included from ClusterFactory
Constructor Details
#initialize(center_point, start_point, end_point) ⇒ ThreePointArc
81 82 83 84 |
# File 'lib/geometry/arc.rb', line 81 def initialize(center_point, start_point, end_point) @center, @start, @end = [center_point, start_point, end_point].map {|p| Point[p]} raise ArgumentError unless [@center, @start, @end].all? {|p| p.is_a?(Point)} end |
Instance Attribute Details
#center ⇒ Object (readonly)
Returns the value of attribute center.
71 72 73 |
# File 'lib/geometry/arc.rb', line 71 def center @center end |
#end ⇒ Object (readonly) Also known as: last
Returns the value of attribute end.
72 73 74 |
# File 'lib/geometry/arc.rb', line 72 def end @end end |
#start ⇒ Object (readonly) Also known as: first
Returns the value of attribute start.
72 73 74 |
# File 'lib/geometry/arc.rb', line 72 def start @start end |