Calculates the forward discrete cosine transform (DCT) of the Vec.
Writes the result in the calling vector. If Vec.Length is a power of 2, the function uses an efficient algorithm that is significantly faster than the direct computation of DCT. For other values of Vec Length, this function uses the direct formulas.
DCT Method