It should be:
result.elements[0 + 0 * 4] = x * x * omc + c; // x^2result.elements[1 + 1 * 4] = y * y * omc + c; // y^2result.elements[2 + 2 * 4] = z * z * omc + c; // z^2
Probably you didn't see it beacuse you always rotated on one axis (i mean {1, 0, 0}, {0, 1, 0} or {0, 0, 1}) and 1^2 is still 1 so it was working or not squaring just didn't have so much impact on the values to be noticeable.
I think you have bug here: https://github.com/TheCherno/Sparky/blob/master/Sparky-core/src/sp/maths/mat4.cpp#L311
It should be:
result.elements[0 + 0 * 4] = x * x * omc + c; // x^2
result.elements[1 + 1 * 4] = y * y * omc + c; // y^2
result.elements[2 + 2 * 4] = z * z * omc + c; // z^2
Probably you didn't see it beacuse you always rotated on one axis (i mean {1, 0, 0}, {0, 1, 0} or {0, 0, 1}) and 1^2 is still 1 so it was working or not squaring just didn't have so much impact on the values to be noticeable.