Exception: BezierCurve::DifferingDimensionError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- BezierCurve::DifferingDimensionError
- Defined in:
- lib/bezier_curve.rb
Overview
Indicates that the points do not all have the same number of dimensions, which makes them impossible to use.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DifferingDimensionError
constructor
A new instance of DifferingDimensionError.
Constructor Details
#initialize ⇒ DifferingDimensionError
Returns a new instance of DifferingDimensionError.
147 148 149 |
# File 'lib/bezier_curve.rb', line 147 def initialize super "All points must have the same number of dimensions" end |
Class Method Details
.check!(pointset) ⇒ Object
150 151 152 153 |
# File 'lib/bezier_curve.rb', line 150 def self.check! pointset raise self if pointset[1..-1].any?{|pt| pointset[0].size != pt.size} end |