/// <summary>
        /// Produces inverse matrix for this matrix and puts result into the inverse
        /// parameter.
        /// </summary>
        /// <param name="inverse">The result inverse matrix.</param>
        public void Inverse(com.epl.geometry.Transformation2D inverse)
        {
            double det = xx * yy - xy * yx;

            if (det == 0)
            {
                inverse.SetZero();
                return;
            }
            det        = 1 / det;
            inverse.xd = (xy * yd - xd * yy) * det;
            inverse.yd = (xd * yx - xx * yd) * det;
            inverse.xx = yy * det;
            inverse.xy = -xy * det;
            inverse.yx = -yx * det;
            inverse.yy = xx * det;
        }