matician - v2.0.0
    Preparing search index...

    Function hypotenuse

    • Calculates the hypotenuse of a right triangle using the Pythagorean theorem.

      Parameters

      • a: number

        Length of one leg.

      • b: number

        Length of the other leg.

      Returns number

      The length of the hypotenuse.

      hypotenuse(3, 4);   // returns 5
      hypotenuse(5, 12); // returns 13