Added MathUtil.map
Apply flex coding conversion