public static ComplexSample multiply(ComplexSample sample1, ComplexSample sample2) { float inphase = (sample1.inphase() * sample2.inphase()) - (sample1.quadrature() * sample2.quadrature()); float quadrature = (sample1.quadrature() * sample2.inphase()) + (sample1.inphase() * sample2.quadrature()); return(new ComplexSample(inphase, quadrature)); }
public static ComplexSample multiply(ComplexSample sample1, ComplexSample sample2) { float inphase = (sample1.inphase() * sample2.inphase()) - (sample1.quadrature() * sample2.quadrature()); float quadrature = (sample1.quadrature() * sample2.inphase()) + (sample1.inphase() * sample2.quadrature()); return new ComplexSample(inphase, quadrature); }
/** * Multiplies this sample by the multiplier sample */ public void multiply(ComplexSample multiplier) { float inphase = (this.inphase() * multiplier.inphase()) - (this.quadrature() * multiplier.quadrature()); float quadrature = (this.quadrature() * multiplier.inphase()) + (this.inphase() * multiplier.quadrature()); mLeft = inphase; mRight = quadrature; }