math for 2d vectors

Added some math for 2D vecrors.