Fix major overstep with last commit
[vg.git] / src / vg / vg_m.h
index 417ca32607d392bd48bf8b8785b8e1a1b70a42d9..c28e477e606f497c86abd6c73e34edc21208111f 100644 (file)
@@ -1311,4 +1311,15 @@ static inline int vg_randint(int max)
    return rand()%max;
 }
 
+static void eval_bezier_time( v3f p0, v3f p1, v3f h0, v3f h1, float t, v3f p )
+{
+   float tt = t*t,
+         ttt = tt*t;
+
+   v3_muls( p1, ttt, p );
+   v3_muladds( p, h1, 3.0f*tt  -3.0f*ttt, p );
+   v3_muladds( p, h0, 3.0f*ttt -6.0f*tt  +3.0f*t, p );
+   v3_muladds( p, p0, 3.0f*tt  -ttt -3.0f*t +1.0f, p );
+}
+
 #endif /* VG_M_H */