public static function areSamePoint(PointInterface $point1, PointInterface $point2)
    {
        if (self::areSameSpace($point1, $point2)) {
            if ($point1->is1D()) {
                return (bool) ($point1->getAbscissa()==$point2->getAbscissa());
            } elseif ($point1->is2D()) {
                return (bool) (
                    ($point1->getAbscissa()==$point2->getAbscissa()) &&
                    ($point1->getOrdinate()==$point2->getOrdinate())
                );
            } elseif ($point1->is3D()) {
                return (bool) (
                    ($point1->getAbscissa()==$point2->getAbscissa()) &&
                    ($point1->getOrdinate()==$point2->getOrdinate()) &&
                    ($point1->getApplicate()==$point2->getApplicate())
                );
            }
        } else {
            throw new \InvalidArgumentException(
                "Can not compare positions of two points of different space types"
            );
        }
    }
public static function areSamePoint(PointInterface $point1, PointInterface $point2)
    {
        if (self::areSameSpace($point1, $point2)) {
            if ($point1->is1D()) {
                return (bool) ($point1->getAbscissa()==$point2->getAbscissa());
            } elseif ($point1->is2D()) {
                return (bool) (
                    ($point1->getAbscissa()==$point2->getAbscissa()) &&
                    ($point1->getOrdinate()==$point2->getOrdinate())
                );
            } elseif ($point1->is3D()) {
                return (bool) (
                    ($point1->getAbscissa()==$point2->getAbscissa()) &&
                    ($point1->getOrdinate()==$point2->getOrdinate()) &&
                    ($point1->getApplicate()==$point2->getApplicate())
                );
            }
        } else {
            throw new \InvalidArgumentException(
                "Can not compare positions of two points of different space types"
            );
        }
    }
public static function areSamePoint ( PointInterface $ point1 , PointInterface $ point2 ) { if ( self :: areSameSpace ( $ point1 , $ point2 ) ) { if ( $ point1 -> is1D ( ) ) { return ( bool ) ( $ point1 -> getAbscissa ( ) == $ point2 -> getAbscissa ( ) ) ; } elseif ( $ point1 -> is2D ( ) ) { return ( bool ) ( ( $ point1 -> getAbscissa ( ) == $ point2 -> getAbscissa ( ) ) && ( $ point1 -> getOrdinate ( ) == $ point2 -> getOrdinate ( ) ) ) ; } elseif ( $ point1 -> is3D ( ) ) { return ( bool ) ( ( $ point1 -> getAbscissa ( ) == $ point2 -> getAbscissa ( ) ) && ( $ point1 -> getOrdinate ( ) == $ point2 -> getOrdinate ( ) ) && ( $ point1 -> getApplicate ( ) == $ point2 -> getApplicate ( ) ) ) ; } } else { throw new \ InvalidArgumentException ( "Can not compare positions of two points of different space types" ) ; } }
Test if two points are in the same position

@param   \Maths\PointInterface $point1
@param   \Maths\PointInterface $point2
@return  bool
@throws  \InvalidArgumentException if the two points are not in the same space type
Test if two points are in the same position