How to make a point move in one direction?

Well, i figured out and made this func


It makes projectile move in any direction