function pointInBoundingBox(u, v, u0, v0, u1, v1, u2, v2) {
  const minU = Math.min(u0, u1, u2);
  const maxU = Math.max(u0, u1, u2);
  const minV = Math.min(v0, v1, v2);
  const maxV = Math.max(v0, v1, v2);
  return u >= minU && u <= maxU && v >= minV && v <= maxV;
}
Computes the terrain height at a specified longitude and latitude.

@param {Rectangle} rectangle The rectangle covered by this terrain data.
@param {number} longitude The longitude in radians.
@param {number} latitude The latitude in radians.
@returns {number} The terrain height at the specified position.  The position is clamped to
         the rectangle, so expect incorrect results for positions far outside the rectangle.