The Law of Cosines applies to any triangle.
Calculations using the Law of Cosines give the same answer as the Pythagorean Theorem when the triangle has a right angle for C.
Don’t forget to make the correct choice of radians or degrees depending on which of these two your machine uses for trigonometric calculations.