Law of cosines - triples: Difference between revisions
Content added Content deleted
m (Minor correction) |
m (C++ - removed redundant test) |
||
Line 460: | Line 460: | ||
int c2 = a * a + b * b - a * b; |
int c2 = a * a + b * b - a * b; |
||
int c = isqrt(c2); |
int c = isqrt(c2); |
||
if |
if (c <= max2 && c * c == c2) |
||
++count; |
++count; |
||
} |
} |