Пример #1
0
        public void CanChangeFrequency(double frequency)
        {
            var source = new SinSource(frequency, 0.0, 1.0);

            Assert.Equal(1.0, source.Sample(1.0 / frequency / 4.0), 2);
        }
Пример #2
0
        public void CanChangeAmplitude(double amplitude)
        {
            var source = new SinSource(1.0, 0.0, amplitude);

            Assert.Equal(amplitude, source.Sample(0.25), 2);
        }
Пример #3
0
        public void CanChangePhase(double phase, double time)
        {
            var source = new SinSource(1.0, phase, 1.0);

            Assert.Equal(1.0, source.Sample(time), 2);
        }
Пример #4
0
        public void ItIsASineWave(double time, double value)
        {
            var source = new SinSource(1.0, 0.0, 1.0);

            Assert.Equal(value, source.Sample(time), 2);
        }