docs: function(other, mirror, normalrotation) {
              mirror = mirror ? true : false;
              normalrotation = normalrotation ? Number(normalrotation) : 0;
              var us = this.normalized();
              other = other.normalized();
              // shift to the origin:
              var transformation = CSG.Matrix4x4.translation(this.point.negated());
              // construct the plane crossing through the origin and the two axes:
              var axesplane = CSG.Plane.anyPlaneFromVector3Ds(
                  new CSG.Vector3D(0, 0, 0), us.axisvector, other.axisvector);
              var axesbasis = new CSG.OrthoNormalBasis(axesplane);
              var angle1 = axesbasis.to2D(us.axisvector).angle();
              var angle2 = axesbasis.to2D(other.axisvector).angle();
              var rotation = 180.0 * (angle2 - angle1) / Math.PI;
              if (mirror) rotation += 180.0;
              transformation = transformation.multiply(axesbasis.getProjectionMatrix());
              transformation = transformation.multiply(CSG.Matrix4x4.rotationZ(rotation));
              transformation = transformation.multiply(axesbasis.getInverseProjectionMatrix());
              var usAxesAligned = us.transform(transformation);
              // Now we have done the transformation for aligning the axes.
              // We still need to align the normals:
              var normalsplane = CSG.Plane.fromNormalAndPoint(other.axisvector, new CSG.Vector3D(0, 0, 0));
              var normalsbasis = new CSG.OrthoNormalBasis(normalsplane);
              angle1 = normalsbasis.to2D(usAxesAligned.normalvector).angle();
              angle2 = normalsbasis.to2D(other.normalvector).angle();
              rotation = 180.0 * (angle2 - angle1) / Math.PI;
              rotation += normalrotation;
              transformation = transformation.multiply(normalsbasis.getProjectionMatrix());
              transformation = transformation.multiply(CSG.Matrix4x4.rotationZ(rotation));
              transformation = transformation.multiply(normalsbasis.getInverseProjectionMatrix());
              // and translate to the destination point:
              transformation = transformation.multiply(CSG.Matrix4x4.translation(other.point));
              // var usAligned = us.transform(transformation);
              return transformation;
          }