|
|
@ -1,4 +1,4 @@ |
|
|
|
// Package triangle: Determine what kind of triangle three side lengths make.
|
|
|
|
// Package triangle determines what kind of triangle three side lengths make.
|
|
|
|
package triangle |
|
|
|
|
|
|
|
import "math" |
|
|
@ -33,7 +33,7 @@ func KindFromSides(a, b, c float64) (k Kind) { |
|
|
|
k = Equ |
|
|
|
case a == b || b == c || a == c: // 2 equal length sides (Iso)
|
|
|
|
k = Iso |
|
|
|
case a != b || b != c || a != c: // No equal length sides (Sca)
|
|
|
|
case a != b && b != c && a != c: // No equal length sides (Sca)
|
|
|
|
k = Sca |
|
|
|
} |
|
|
|
return k |
|
|
|