Here are several examples of non-linear transformation functions that you can use to obfuscate numbers while preserving their relative order. Each function applies a different non-linear mathematical transformation to the input values. These transformations will make it more difficult to reverse engineer the original numbers.
This function applies an exponential transformation with a base, making the values grow rapidly as the input increases.
function obfuscateExponential(arr) {
const base = 1.2; // Base of the exponential growth
const obfuscatedArr = arr.map(num => Math.pow(base, num));