mathutils¶
Generic math operations with type constraints.
Overview¶
The mathutils package provides mathematical utilities that work with generic numeric types through Go generics and constraints. All functions use appropriate type constraints (cmp.Ordered, constraints.Integer, etc.) for compile-time type safety.
Functions¶
Range Operations: Clamp, InRange Numeric Operations: Abs, Average Number Theory: Gcd, Lcm, IsPrime