This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* return the mid value among x, y, and z | |
* @param x | |
* @param y | |
* @param z | |
* @param compare | |
* @returns {Promise.<*>} | |
*/ | |
async function getPivot(x, y, z, compare) { | |
if (await compare(x, y) < 0) { |