src/Maths/Geometry/Segment.php
public function getCenter()
    {
        $abscissas = array(
            $this->getPointA()->getAbscissa(), $this->getPointB()->getAbscissa()
        );
        $ordinates = array(
            $this->getPointA()->getOrdinate(), $this->getPointB()->getOrdinate()
        );
        return new Point(
            ((max($abscissas) - min($abscissas)) / 2),
            ((max($ordinates) - min($ordinates)) / 2)
        );
    }
public function getCenter()
    {
        $abscissas = array(
            $this->getPointA()->getAbscissa(), $this->getPointB()->getAbscissa()
        );
        $ordinates = array(
            $this->getPointA()->getOrdinate(), $this->getPointB()->getOrdinate()
        );
        return new Point(
            ((max($abscissas) - min($abscissas)) / 2),
            ((max($ordinates) - min($ordinates)) / 2)
        );
    }
Get the middle of the segment as a `\Maths\Geometry\Point` object

@return  \Maths\Geometry\Point