src/Maths/Geometry/Quadrilateral.php
public function getSecondDiagonal()
    {
        $b = 'b';
        $d = 'd';
        $directions = Maths::getDirectionByPoints($this->getPointB(), $this->getPointD());
        if ($directions[0]==-1) {
            $b = 'd';
            $d = 'b';
        }
        try {
            return $this->getSegment($b, $d);
        } catch (\InvalidArgumentException $e) {
            throw $e;
        }
    }
public function getSecondDiagonal()
    {
        $b = 'b';
        $d = 'd';
        $directions = Maths::getDirectionByPoints($this->getPointB(), $this->getPointD());
        if ($directions[0]==-1) {
            $b = 'd';
            $d = 'b';
        }
        try {
            return $this->getSegment($b, $d);
        } catch (\InvalidArgumentException $e) {
            throw $e;
        }
    }
Get the [B->D] diagonal as a Segment with a positive direction(s)

@return  Segment
@throws  \InvalidArgumentException caught on Segment creation