CheckColors4 seems to have different math in it's body vs it's comment

In math.color.ts - CheckColors4 doesn’t apply math, the way the comment suggests? 4 in comment vs 3 in code.
/

* Check the content of a given array and convert it to an array containing RGBA data
* If the original array was already containing count * 4 values then it is returned directly
* @param colors defines the array to check
* @param count defines the number of RGBA data to expect
* @returns an array containing count * 4 values (RGBA)
*/
public static CheckColors4(colors: number[], count: number): number[] {
// Check if color3 was used
if (colors.length === count * 3) {
var colors4 = [];
for (var index = 0; index < colors.length; index += 3) {
var newIndex = (index / 3) * 4;
colors4[newIndex] = colors[index];
colors4[newIndex + 1] = colors[index + 1];
colors4[newIndex + 2] = colors[index + 2];
colors4[newIndex + 3] = 1.0;
}

            return colors4;
        }

        return colors;

IMHO it is correct

/**
* Check the content of a given array and convert it to an array containing RGBA data
* If the original array was already containing count * 4 values then it is returned directly
* @param colors defines the array to check colors is array of form [r, g, b, r, g, b, r, g, b, ....] or [r, g, b, a, r, g, b, a .........]
* @param count defines the number of RGBA data to expect
* @returns an array containing count * 4 values (RGBA), array of form [r, g, b, a, r, g, b, a .........] which will be a multiple of 4
*/
public static CheckColors4(colors: number[], count: number): number[] {
    // Check if color3 was used
    if (colors.length === count * 3) { // if length is correct multiple of 3 it has form  [r, g, b, r, g, b, r, g, b, ....] and of right length so convert
        var colors4 = [];
        for (var index = 0; index < colors.length; index += 3) { //jump along array in groups of three r, g, b
           var newIndex = (index / 3) * 4;  // set index to group index and then into groups of 4 for r, g, b, a
           colors4[newIndex] = colors[index]; //r
           colors4[newIndex + 1] = colors[index + 1];  //g
           colors4[newIndex + 2] = colors[index + 2]; //b
           colors4[newIndex + 3] = 1.0; //a
       }
       return colors4;  //return as color4 array [r, g, b, a, r, g, b, a .........]
   }
   return colors; //assume already color4 array so return
}

I’d agree with @JohnK
It seems fine,

* If the original array was already containing count * 4 values then it is returned directly

the code just goes

if(color3) { convert } else { return } 

rather than

 if(color4) { return } else { convert } 

no need for nitpicking if you ask me

… Ah, you’re all correct - it was my mistake.