Posts

Showing posts from April, 2021
Share:

Signal Generator In C# | Saatody | Amit Padhiyar

using System; using System.Diagnostics; namespace SGDemo { /// <summary> /// Types of signal. /// </summary> public enum SignalTypes { Sine, Square, Triangle, Sawtooth } /// <summary> /// Directions of signal. /// </summary> public enum Directions { Forward, Backward } /// <summary> /// Signal generator. /// </summary> public class SignalGenerator { /// <summary> /// Shift signal on y axis. Value can be less than 0 too. /// </summary> private float offset = 0f; public float Offset { set { offset = value; } get { return offset; } } /// <summary> /// Amplitudet or height of signal. Value can be less than 0 too. /// </summary>