In what way does it not work ?
Have you tried putting some Serial.prints in there to see what the value of y is at various points ?
In what way does it not work ?
Have you tried putting some Serial.prints in there to see what the value of y is at various points ?