docs: function(x, y) {
          //avoid negatives
          if (this.seamless) {
              x = (x%this.size + this.size)%this.size
              y = (y%this.size + this.size)%this.size
          } else {
              x = clamp(x, 0, this.size)
              y = clamp(y, 0, this.size)
          }
  
          if (this.smooth)
              return sampling.bilinear(this.data, this.size, this.size, x, y);
          else
              return sampling.nearest(this.data, this.size, this.size, x, y);
      }