moved vector fns to math3d.h