The vector data type is corresponding to the Vec4d type in C++. The implementation of the scripting type is done in prototypeVec3d.
You can use the following functions: