Calculates the third side length of a triangle (either the hypotenuse or the second leg) given two side lengths with the Pythagorean theorem.
The first side length
The second side length
Optional
The type of calculation, either "hyp" for hypotenuse or "leg" for leg
// Returns 3const leg = Chalkboard.geom.Pythagorean(4, 5, "leg");// Returns 5const hyp = Chalkboard.geom.Pythagorean(3, 4, "hyp"); Copy
// Returns 3const leg = Chalkboard.geom.Pythagorean(4, 5, "leg");// Returns 5const hyp = Chalkboard.geom.Pythagorean(3, 4, "hyp");
Calculates the third side length of a triangle (either the hypotenuse or the second leg) given two side lengths with the Pythagorean theorem.