Written the logic for the equalateral triangle shorter.

(p == q && q == r) instead of (p == q && p == r && q == r). if p == q
and q == r then implicit p == q so not needed.