I think there is a ‘bug’ in the Array OP when you want to generate values between 0 and 1 or 1 - 0, the first and last value should be 0 and 1. (1 and 0) respectively. Here is the fix (just removing 1 in the division).
Line 73
for (i = 0; i < arrLength; i++)
{
arr[i] = i / (arrLength - 1);
}
Line 83
for (i = 0; i < arrLength; i++)
{
arr[i] = 1-i / (arrLength - 1);
}