function isConvex(data) {
  const center = getIntersection([
    0,
    0,
    data[2],
    data[3],
    data[0],
    data[1],
    data[4],
    data[5],
  ]);

  return (
    center != null &&
    data[2] < center[0] == center[0] < 0 &&
    data[3] < center[1] == center[1] < 0 &&
    data[4] < center[0] == center[0] < data[0] &&
    data[5] < center[1] == center[1] < data[1]
  );
}
Checks if curve is convex. Control points of such a curve must form a convex
quadrilateral with diagonals crosspoint inside of it.

@param {ReadonlyArray<number>} data
@returns {boolean}