by Matt tags: math, algebra, validation
Given three numbers, x, y and z, determine whether they are the edges of a right angled triangle. Examples rightTriangle(3, 4, 5) ➞ true // This is the classic example of a "nice" right angled triangle. rightTriangle(145, 105, 100) ➞ true // This is a less famous example. rightTriangle(70, 130, 110) ➞ false // This isn't a right angled triangle. Notes Notic
Given three numbers, x
, y
and z
, determine whether they are the edges of a right angled triangle.
rightTriangle(3, 4, 5) ➞ true
// This is the classic example of a "nice" right angled triangle.
rightTriangle(145, 105, 100) ➞ true
// This is a less famous example.
rightTriangle(70, 130, 110) ➞ false
// This isn't a right angled triangle.