Experimented with js Math functions.