English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to write a test case to test three lines to determine if they form a valid triangle and what type of triangle they form. Is there a simple math algorithm/s which can be used for these tests?

2007-08-01 11:11:40 · 1 answers · asked by Ralph 7 in Science & Mathematics Other - Science

1 answers

Let...
a = length of shortest line segment
b = length of 2nd shortest line segment
c = length of longest line segment

If a + b > c, then you can make a valid triangle out of the three line segments.

Furthermore, if a^2 + b^2 > c^2, the triangle is acute, if a^2 + b^2 = c^2 the triangle is right, and if a^2 + b^2 < c^2 the triangle is obtuse.

2007-08-02 16:02:27 · answer #1 · answered by Bill Lumbergh 4 · 0 0

fedest.com, questions and answers