Returns a function that shapes a 0..1 value as a sine waveform.
An input value of 0 will be the very beginning of the wave cycle, input of 1 will be the end,
0.5 will be them middle and so on.
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. An input value of 0 will be the very beginning of the wave cycle, input of 1 will be the end, 0.5 will be them middle and so on.
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).