Returns a function that shapes a 0..1 value as a sine waveform.
consts = sineShape(); // Calculate value of sine wave at 50% // By default there is one oscillation, thus // it will be the middle of the cycle. s(0.5);
The period determines number of cycles for
an input value of 1.
// Oscillate twice in 0..1 range consts = sineShape(2);
No bounds checks are performed on input value.
Ensure it is 0..1 (inclusive).
Returns a function that shapes a 0..1 value as a sine waveform.
The
period
determines number of cycles for an input value of 1.No bounds checks are performed on input value. Ensure it is 0..1 (inclusive).