JavaScript Math helper for Interactive Art