Пример #1
0
        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));
        }
Пример #2
0
        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);
        }
Пример #3
0
        /**
         * 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;
        }
Пример #4
0
        /**
         * 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;
        }