return a + t*(b-a);
}
+static inline f64 vg_lerp( f64 a, f64 b, f64 t )
+{
+ return a + t*(b-a);
+}
+
static inline void vg_slewf( f32 *a, f32 b, f32 speed ){
f32 d = vg_signf( b-*a ),
c = *a + d*speed;
*a = vg_minf( b*d, c*d ) * d;
}
-static inline f64 vg_lerp( f64 a, f64 b, f64 t )
-{
- return a + t*(b-a);
+static inline f32 vg_smoothstepf( f32 x ){
+ return x*x*(3.0f - 2.0f*x);
}
+
/* correctly lerp around circular period -pi -> pi */
static f32 vg_alerpf( f32 a, f32 b, f32 t )
{