public static function hypotenuse(
        Segment $a,
        Segment $b
    ): Segment {
        $hypotenuse = $a
            ->length()
            ->power(new Integer(2))
            ->add($b->length()->power(new Integer(2)))
            ->squareRoot();

        return new Segment($hypotenuse);
    }
public static function hypotenuse(
        Segment $a,
        Segment $b
    ): Segment {
        $hypotenuse = $a
            ->length()
            ->power(new Integer(2))
            ->add($b->length()->power(new Integer(2)))
            ->squareRoot();

        return new Segment($hypotenuse);
    }
public static function hypotenuse ( Segment $ a , Segment $ b ) : Segment { $ hypotenuse = $ a -> length ( ) -> power ( new Integer ( 2 ) ) -> add ( $ b -> length ( ) -> power ( new Integer ( 2 ) ) ) -> squareRoot ( ) ; return new Segment ( $ hypotenuse ) ; }
Compute the hypotenuse for adjacent sides A and B
Compute the hypotenuse for adjacent sides A and B