import { xCheck } from "./xCheck.js";
import { xGetFromToIndex } from "./xGetFromToIndex.js";
/**
 * Computes the minimal value of an array of values.
 * @param array - array of numbers
 * @param options - options
 */
export function xMinValue(array, options = {}) {
    xCheck(array);
    const { fromIndex, toIndex } = xGetFromToIndex(array, options);
    let minValue = array[fromIndex];
    for (let i = fromIndex + 1; i <= toIndex; i++) {
        if (array[i] < minValue) {
            minValue = array[i];
        }
    }
    return minValue;
}
//# sourceMappingURL=xMinValue.js.map