pub enum MathError {
InvalidKnotVector {
expected: usize,
got: usize,
},
InvalidWeights {
expected: usize,
got: usize,
},
InvalidControlPointGrid {
expected_rows: usize,
expected_cols: usize,
},
ZeroVector,
SingularMatrix,
EmptyInput,
ParameterOutOfRange {
value: f64,
min: f64,
max: f64,
},
ConvergenceFailure {
iterations: usize,
},
}Expand description
Errors from math operations.
Variants§
InvalidKnotVector
Knot vector length does not match control points and degree.
InvalidWeights
Weights vector length does not match control points.
InvalidControlPointGrid
Control point grid dimensions are inconsistent.
Fields
ZeroVector
Cannot normalize a zero-length vector.
SingularMatrix
Matrix is singular and cannot be inverted.
EmptyInput
Input collection is empty where at least one element is required.
ParameterOutOfRange
Parameter is outside the valid range.
Fields
ConvergenceFailure
Newton iteration did not converge within the allowed iterations.
Trait Implementations§
Source§impl Error for MathError
impl Error for MathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for MathError
impl RefUnwindSafe for MathError
impl Send for MathError
impl Sync for MathError
impl Unpin for MathError
impl UnsafeUnpin for MathError
impl UnwindSafe for MathError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more