ChensHelpers
Chen.Helpers.MathHelpers.Wave
Wave.Square(float, float, float, float) Method
Computes for a Square Wave. Always multiply this to the original value.
public static float Square(float phase, float frequency, float amplitude, float baseValue);
Parameters
phase
System.Single
Offset from time
frequency
System.Single
Number of complete cycles in a given time
amplitude
System.Single
Maximum and minimum values
baseValue
System.Single
Offset from the result
Returns
System.Single
The computed value for the wave