Originally posted by geepamooglePythagoras pretty much predates cos.
The full formula from which the Pythagorus Theorem is based is as follows (as I recall)
C^2 = A^2 + B^2 - 2*A*B*cos(o) (where o = the angle between sides A and B)
At 90 degrees, cos(o) = 0, thus eliminating the third term.
At 180 degrees, cos(o) = -1, making the formula C^2 = A^2 + B^2 + 2*A*B, which simplifies into C^2 = (A+B)^2. Given lengths are generally considered positive, C is thus A+B.