Vector and matrix algebra for the D language (2D, 3D and 4D)