Sha256: 04f9233c5827764a21a95aa2fec8a33a948ef452ce70a914777ffacd99617409
Contents?: true
Size: 851 Bytes
Versions: 1
Compression:
Stored size: 851 Bytes
Contents
require_relative 'point' module Geometry =begin rdoc Arcs are Circles that don't quite go all the way around == Usage An {Arc} with its center at [1,1] and a radius of 2 that starts at the X-axis and goes to the Y-axis (counter-clockwise) arc = Geometry::Arc.new [1,1], 2, 0, 90 =end class Arc attr_reader :center attr_reader :radius attr_reader :start_angle, :end_angle # Construct a new {Arc} # @overload initialize(center, radius, start_angle, end_angle) # @param [Point] center The {Point} at the center of it all # @param [Numeric] radius Radius # @param [Numeric] start_angle Starting angle # @param [Numeric] end_angle Ending angle def initialize(center, radius, start_angle, end_angle) @center = Point[center] @radius = radius @start_angle = start_angle @end_angle = end_angle end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
geometry-4 | lib/geometry/arc.rb |