Browse Source

Standardized package comment, correct Sca logic

master
jimi 9 years ago
parent
commit
56d891f4c1
  1. 4
      triangle.go

4
triangle.go

@ -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

Loading…
Cancel
Save