1#[derive(Debug, thiserror::Error)]
10pub enum MathError {
11 #[error("invalid knot vector: expected {expected} knots, got {got}")]
13 InvalidKnotVector {
14 expected: usize,
16 got: usize,
18 },
19
20 #[error("invalid weights: expected {expected} weights, got {got}")]
22 InvalidWeights {
23 expected: usize,
25 got: usize,
27 },
28
29 #[error(
31 "invalid control point grid: expected {expected_rows}x{expected_cols}, got inconsistent dimensions"
32 )]
33 InvalidControlPointGrid {
34 expected_rows: usize,
36 expected_cols: usize,
38 },
39
40 #[error("cannot normalize zero vector")]
42 ZeroVector,
43
44 #[error("singular matrix cannot be inverted")]
46 SingularMatrix,
47
48 #[error("empty input where at least one element is required")]
50 EmptyInput,
51
52 #[error("parameter {value} out of range [{min}, {max}]")]
54 ParameterOutOfRange {
55 value: f64,
57 min: f64,
59 max: f64,
61 },
62
63 #[error("Newton iteration did not converge after {iterations} iterations")]
65 ConvergenceFailure {
66 iterations: usize,
68 },
69}
70
71pub mod aabb;
72pub mod analytic_intersection;
73pub mod bvh;
74pub mod cdt;
75pub mod chord;
76pub mod convex_hull;
77pub mod curves;
78pub mod curves2d;
79pub mod det_hash;
80pub mod filtered;
81pub mod frame;
82pub mod mat;
83pub mod nurbs;
84pub mod obb;
85pub mod plane;
86pub mod polygon2d;
87pub mod polygon_boolean;
88pub mod polygon_offset;
89pub mod predicates;
90pub mod quadrature;
91pub mod ray_triangle;
92pub mod surfaces;
93pub mod tolerance;
94pub mod traits;
95pub mod vec;
96
97#[cfg(feature = "simd")]
98pub mod simd;