Comment Comment by TNO With JavaScript 1.8.1: function triangle(a,b) a <= 0 || b <= 0 ? 0 : (a = a*a + b*b) > 0 ? Math.pow(a,.5) : 0; parent TNO 17 years ago