public static function adjacentSide(
        Segment $hypotenuse,
        Segment $adjacentSide
    ): Segment {
        $side = $hypotenuse
            ->length()
            ->power(new Integer(2))
            ->subtract($adjacentSide->length()->power(new Integer(2)))
            ->squareRoot();

        return new Segment($side);
    }
public static function adjacentSide(
        Segment $hypotenuse,
        Segment $adjacentSide
    ): Segment {
        $side = $hypotenuse
            ->length()
            ->power(new Integer(2))
            ->subtract($adjacentSide->length()->power(new Integer(2)))
            ->squareRoot();

        return new Segment($side);
    }
public static function adjacentSide ( Segment $ hypotenuse , Segment $ adjacentSide ) : Segment { $ side = $ hypotenuse -> length ( ) -> power ( new Integer ( 2 ) ) -> subtract ( $ adjacentSide -> length ( ) -> power ( new Integer ( 2 ) ) ) -> squareRoot ( ) ; return new Segment ( $ side ) ; }
Compute a side A or B from the hypotenuse and one side
Compute a side A or B from the hypotenuse and one side