public final function containsLocation( $xOrPoint, int $y = null ) : bool
   {

      $x = $xOrPoint;

      if ( $x instanceof Point )
      {
         $y = $x->y;
         $x = $x->x;
      }
      else if ( \is_integer( $xOrPoint ) )
      {
         $x = $xOrPoint;
      }
      else if ( TypeTool::IsInteger( $xOrPoint ) )
      {
         $x = \intval( $xOrPoint );
      }
      else
      {
         $x = 0;
      }

      if ( ! \is_int( $y ) )
      {
         $y = \intval( $y );
      }

      return (
         (
            (
               ( $this->point->x <= $x )
               &&
               ( $x < ( $this->point->x + $this->size->width ) )
            )
            &&
            ( $this->point->y <= $y )
         )
         &&
         ( $y < ( $this->point->y + $this->size->height ) )
      );

   }
public final function containsLocation( $xOrPoint, int $y = null ) : bool
   {

      $x = $xOrPoint;

      if ( $x instanceof Point )
      {
         $y = $x->y;
         $x = $x->x;
      }
      else if ( \is_integer( $xOrPoint ) )
      {
         $x = $xOrPoint;
      }
      else if ( TypeTool::IsInteger( $xOrPoint ) )
      {
         $x = \intval( $xOrPoint );
      }
      else
      {
         $x = 0;
      }

      if ( ! \is_int( $y ) )
      {
         $y = \intval( $y );
      }

      return (
         (
            (
               ( $this->point->x <= $x )
               &&
               ( $x < ( $this->point->x + $this->size->width ) )
            )
            &&
            ( $this->point->y <= $y )
         )
         &&
         ( $y < ( $this->point->y + $this->size->height ) )
      );

   }
public final function containsLocation ( $ xOrPoint , int $ y = null ) : bool { $ x = $ xOrPoint ; if ( $ x instanceof Point ) { $ y = $ x -> y ; $ x = $ x -> x ; } else if ( \ is_integer ( $ xOrPoint ) ) { $ x = $ xOrPoint ; } else if ( TypeTool :: IsInteger ( $ xOrPoint ) ) { $ x = \ intval ( $ xOrPoint ) ; } else { $ x = 0 ; } if ( ! \ is_int ( $ y ) ) { $ y = \ intval ( $ y ) ; } return ( ( ( ( $ this -> point -> x <= $ x ) && ( $ x < ( $ this -> point -> x + $ this -> size -> width ) ) ) && ( $ this -> point -> y <= $ y ) ) && ( $ y < ( $ this -> point -> y + $ this -> size -> height ) ) ) ; }
Returns, if the current rectangle contains the defined location.

@param  int|\Beluga\Drawing\Point $xOrPoint
@param  int|null                  $y
@return boolean
Returns if the current rectangle contains the defined location .