Improved MathUtil.sin and cos