Esempio n. 1
0
        public static ComplexSample Multiply(ComplexSample sample, float left, float right)
        {
            float l = (sample.Left * left) - (sample.Right * right);
            float r = (sample.Right * left) + (sample.Left * right);

            return(new ComplexSample(l, r));
        }
Esempio n. 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));
        }
Esempio n. 3
0
        public void Multiply(ComplexSample multiplier)
        {
            float inphase = (InPhase() * multiplier.InPhase()) -
                            (Quadrature() * multiplier.Quadrature());

            float quadrature = (Quadrature() * multiplier.InPhase()) +
                               (InPhase() * multiplier.Quadrature());

            mLeft  = inphase;
            mRight = quadrature;
        }
Esempio n. 4
0
 public void Add(ComplexSample adder)
 {
     mLeft  += adder.Left;
     mRight += adder.Right;
 }