Added clamp functions and made MathEx final