function isEnclosedY(yp, y1, y2) {
  if (y1 < yp && yp < y2 || y2 < yp && yp < y1) {
    return true;
  }

  return false;
}
/**
* Returns true if the y-position yp is enclosed within y-positions y1 and y2.
*
* @param {Number} yp - The y position of point p.
* @param {Number} y1 - The y position of point 1.
* @param {Number} y2 - The y position of point 2.
* @return {Boolean} True if the y-position yp is enclosed within y-positions y1 and y2.
*/
Returns true if the y-position yp is enclosed within y-positions y1 and y2.
Returns true if the y - position yp is enclosed within y - positions y1 and y2 .
function isEnclosedY(yp, y1, y2) {
  if (y1 < yp && yp < y2 || y2 < yp && yp < y1) {
    return true;
  }
  return false;
}
function isEnclosedY ( yp , y1 , y2 ) { if ( y1 < yp && yp < y2 || y2 < yp && yp < y1 ) { return true ; } return false ; }
Returns true if the y-position yp is enclosed within y-positions y1 and y2.
Returns true if the y - position yp is enclosed within y - positions y1 and y2 .