function i(r, e) {
  let t = 0;
  if ((Array.isArray(r) || r instanceof Float32Array) && (Array.isArray(e) || e instanceof Float32Array)) {
    if (r.length !== e.length) return Number.POSITIVE_INFINITY;
    for (let n = 0; n < r.length; ++n)
      t = Math.max(t, i(r[n], e[n]));
    return t;
  } else if (typeof r == "number" && typeof e == "number") {
    if (isNaN(r) && isNaN(e))
      return 0;
    if (!isFinite(r) || !isFinite(e))
      return r === e ? 0 : Number.POSITIVE_INFINITY;
    const n = Math.abs(r - e);
    return t = Math.max(t, n), t;
  } else
    return Number.POSITIVE_INFINITY;
}
export {
  i as arraysClose
};
