static float bezierat( float a, float b, float c, float d, float t ) { return (Mathf.Pow(1-t,3) * a + 3*t*(Mathf.Pow(1-t,2))*b + 3*Mathf.Pow(t,2)*(1-t)*c + Mathf.Pow(t,3)*d ); } }