nl_tokens: 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 : )
pl_tokens: function ( r ) { if ( r . containsPoint ( this ) ) { return this ; } this . x = mmin ( mmax ( this . x , r . x ) , r . x + r . <mask> ) ; this . y = mmin ( mmax ( this . y , r . y ) , r . y + r . height ) ; return this ; }