I believe I've discovered a bug in the delay(time, value) function.
The function behaves differently according to the time input in a seemingly arbitray way.
For any time input less than 28.794 seconds, the delay function starts a periodic time based function for a shape as though that time were 0. For example, delay(4, triangle(2)) will start at a value of 0 and increase to 100 over the span of one second for the first half period.
However, for time inputs equal to or greater than 28.794 seconds, the delay function appears to act as though the periodic time based function had actually "started" at 0 seconds but just change all the values before the input time to 0. For example, delay(28.794, triangle(2)) will start at a value of 79.4 instead of 0, and it will be exactly in sync with a triangle(2) function that was activated at the same time.
If this is intentional, is there anyway to avoid or toggle this behavior to be consistent? If not, it would be greatly appreciated if it could be remedied.
One way I've found to avoid the bug right now is to avoid delay times equal to or above 28.794 seconds by simply breaking up the delay into smaller components that sum up to the desired time. For example, delay(1, delay(27.794, triangle(2))) reverts the behavior back to the way it works below 28.794 s.
I don't know what the significance of 28.794 is. The only thing I noticed is that it is the product of 6 and 4.799, and 4.799 does not seem like a random number. But I don't really know what's going on under the hood here.