CoffeeScript maths made triangular