Used type parameters on MathUtil functions.
Broke rnd. Fixed rnd.