refactored vector3d.go functions.