Move toRad function to utilities.js and add new toDeg function