level smooth transition camera
[fishladder.git] / vg / vg_m.h
index 6276edb814bdb23bb0b83e036698ebf4b9d9513a..a567092e79b130fa83dfe2234ead19aa95ad4d78 100644 (file)
--- a/vg/vg_m.h
+++ b/vg/vg_m.h
@@ -145,6 +145,12 @@ static inline float v2_dist( v2f a, v2f b )
        return sqrtf( v2_dist2( a, b ) );
 }
 
+static inline void v2_lerp( v2f a, v2f b, float t, v2f d )
+{
+       d[0] = a[0] + t*(b[0]-a[0]);
+       d[1] = a[1] + t*(b[1]-a[1]);
+}
+
 // Vector 3
 // ==================================================================================================================