protected function areaOfTriangle(
        PointInterface $a,
        PointInterface $b,
        PointInterface $c
    ) {
        list( $ax, $ay ) = $a->getCoordinates();
        list( $bx, $by ) = $b->getCoordinates();
        list( $cx, $cy ) = $c->getCoordinates();
        $area  = $ax * ( $by - $cy );
        $area += $bx * ( $cy - $ay );
        $area += $cx * ( $ay - $by );
        return abs($area / 2);
    }
protected function areaOfTriangle(
        PointInterface $a,
        PointInterface $b,
        PointInterface $c
    ) {
        list( $ax, $ay ) = $a->getCoordinates();
        list( $bx, $by ) = $b->getCoordinates();
        list( $cx, $cy ) = $c->getCoordinates();
        $area  = $ax * ( $by - $cy );
        $area += $bx * ( $cy - $ay );
        $area += $cx * ( $ay - $by );
        return abs($area / 2);
    }
protected function areaOfTriangle ( PointInterface $ a , PointInterface $ b , PointInterface $ c ) { list ( $ ax , $ ay ) = $ a -> getCoordinates ( ) ; list ( $ bx , $ by ) = $ b -> getCoordinates ( ) ; list ( $ cx , $ cy ) = $ c -> getCoordinates ( ) ; $ area = $ ax * ( $ by - $ cy ) ; $ area += $ bx * ( $ cy - $ ay ) ; $ area += $ cx * ( $ ay - $ by ) ; return abs ( $ area / 2 ) ; }
Calculate the area of a triangle

@param PointInterface $a First point
@param PointInterface $b Middle point
@param PointInterface $c Last point

@return float
Calculate the area of a triangle