Here you can find the source of multiplyComplexVectors(float[] cA, float[] cB, long limit)
private static float[] multiplyComplexVectors(float[] cA, float[] cB, long limit)
//package com.java2s; //License from project: Open Source License public class Main { private static float[] multiplyComplexVectors(float[] cA, float[] cB, long limit) { assert limit * 2 == cA.length; for (int i = 0; i < limit; i++) { float realA = cA[i * 2]; float imA = cA[i * 2 + 1]; float realB = cB[i * 2]; float imB = cB[i * 2 + 1]; cA[i * 2] = realA * realB - imA * imB; cA[i * 2 + 1] = realA * imB + imA * realB; }/*from w w w . j ava 2 s .co m*/ return cA; } }