ixfx
    Preparing search index...

    Function wrap

    • Wraps a point to be within ptMin and ptMax. Note that max values are exclusive, meaning the return value will always be one less.

      Eg, if a view port is 100x100 pixels, wrapping the point 150,100 yields 50,99.

      // Wraps 150,100 to on 0,0 -100,100 range
      wrap({x:150,y:100}, {x:100,y:100});

      Wrap normalised point:

      wrap({x:1.2, y:1.5}); // Yields: {x:0.2, y:0.5}
      

      Parameters

      Returns Geometry.Point

      Wrapped point