function _sAssign(sVal, iVal) {
  if (sVal > 0 && sVal < iVal) {
    return sVal;
  }
  else {
    return iVal;
  }
}
Draw an image to the main canvas of the p5js sketch

@method image
@param  {p5.Image} img    the image to display
@param  {Number}   x      the x-coordinate at which to place the top-left
                          corner of the source image
@param  {Number}   y      the y-coordinate at which to place the top-left
                          corner of the source image
@param  {Number}   [width]  the width to draw the image
@param  {Number}   [height] the height to draw the image
@example
<div>
<code>
var img;
function preload() {
  img = loadImage("assets/laDefense.jpg");
}
function setup() {
  image(img, 0, 0);
  image(img, 0, 0, 100, 100);
  image(img, 0, 0, 100, 100, 0, 0, 100, 100);
}
</code>
</div>
<div>
<code>
function setup() {
  // here we use a callback to display the image after loading
  loadImage("assets/laDefense.jpg", function(img) {
    image(img, 0, 0);
  });
}
</code>
</div>

@alt
image of the underside of a white umbrella and grided ceiling above
image of the underside of a white umbrella and grided ceiling above