Exemplo n.º 1
0
        public static float getScaleX(uiMatrix3 matrix)
        {
            // ignore perspective parameters for now.
            if (matrix.isIdentity())
            {
                return(1.0f);
            }

            if (matrix.getSkewY() == 0)
            {
                return(matrix.getScaleX());
            }

            var x = matrix.getScaleX();
            var y = matrix.getSkewY();

            return(Mathf.Sqrt(x * x + y * y));
        }