• Calculates the third side length of a triangle (either the hypotenuse or the second leg) given two side lengths with the Pythagorean theorem.

    Parameters

    • a: number

      The first side length

    • b: number

      The second side length

    • Optional type: "hyp" | "leg" = "hyp"

      The type of calculation, either "hyp" for hypotenuse or "leg" for leg

    Returns number

Generated using TypeDoc