Exception: BezierCurve::ZeroDimensionError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- BezierCurve::ZeroDimensionError
- Defined in:
- lib/bezier_curve.rb
Overview
Indicates an error where the control points are in zero dimensions. Sounds silly, but you never know, when software is generating the points.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ZeroDimensionError
constructor
A new instance of ZeroDimensionError.
Constructor Details
#initialize ⇒ ZeroDimensionError
Returns a new instance of ZeroDimensionError.
135 136 137 |
# File 'lib/bezier_curve.rb', line 135 def initialize super "Points given must have at least one dimension" end |
Class Method Details
.check!(pointset) ⇒ Object
138 139 140 141 |
# File 'lib/bezier_curve.rb', line 138 def self.check! pointset raise self if pointset[0].size == 0 end |