Code:
vec_set(temp, vector(mouse_cursor.x, mouse_cursor.y, 0));
vec_sub(temp, vector(mouse_pos.x, mouse_pos.y, 0));
vec_normalize(temp, minv(42, vec_length(temp)));
mouse_pos.x += temp.x;
mouse_pos.y += temp.y;