whole_func_string: function(r) {
  	    if (r.containsPoint(this)){
  	        return this;
  	    }
  	    this.x = mmin(mmax(this.x, r.x), r.x + r.width);
  	    this.y = mmin(mmax(this.y, r.y), r.y + r.height);
  	    return this;
          }
func_code_string: function(r) {
  	    if (r.containsPoint(this)){
  	        return this;
  	    }
  	    this.x = mmin(mmax(this.x, r.x), r.x + r.width);
  	    this.y = mmin(mmax(this.y, r.y), r.y + r.height);
  	    return this;
          }
func_documentation_string: If point lies outside rectangle `r`, return the nearest point on the boundary of rect `r`, otherwise return point itself. (see Squeak Smalltalk, Point>>adhereTo:)