MATH: Refactored math::algo::vector_clean() function