/// <summary>Prepares this matrix for interpolation with the given one.</summary>
        public void PrepareForInterpolate(InterpolationMatrix b)
        {
            // 20.2.2
            Vector2 scaleA  = Scale;
            Vector2 scaleB  = b.Scale;
            float   angleAi = Angle;
            float   angleBi = b.Angle;
            float   angleA  = angleAi;
            float   angleB  = angleBi;


            if ((scaleA.x < 0f && scaleB.y < 0f) || (scaleA.y < 0f && scaleB.x < 0f))
            {
                scaleA.x = -scaleA.x;
                scaleA.y = -scaleA.y;
                angleA  += angleA < 0f ? 180f : -180f;

                // Write out scale:
                Scale = scaleA;
            }

            // Don't rotate the long way around.
            if (angleA == 0f)
            {
                angleA = 360f;
            }

            if (angleB == 0f)
            {
                angleB = 360f;
            }

            if (Math.Abs(angleA - angleB) > 180f)
            {
                if (angleA > angleB)
                {
                    angleA -= 360f;
                }
                else
                {
                    angleB -= 360f;
                }
            }

            // Write out angles:
            if (angleAi != angleA)
            {
                Angle = angleA;
            }

            if (angleBi != angleB)
            {
                b.Angle = angleB;
            }
        }
        protected override Css.Value Clone()
        {
            InterpolationMatrix result = new InterpolationMatrix(Matrix_);

            return(result);
        }