Changed Math.js to AGMath.js