示例#1
0
        public static Vector2Dec operator /(Vector2Dec value1, Vector2Dec value2)
        {
            Vector2Dec result = new Vector2Dec();

            result.X = value1.X / value2.X;
            result.Y = value1.Y / value2.Y;
            return(value1);
        }
示例#2
0
        public static void Transform(ref Vector2Dec position, ref Matrix matrix, out Vector2Dec result)
        {
            var x = (position.X * (decimal)matrix.M11) + (position.Y * (decimal)matrix.M21) + (decimal)matrix.M41;
            var y = (position.X * (decimal)matrix.M12) + (position.Y * (decimal)matrix.M22) + (decimal)matrix.M42;

            result   = new Vector2Dec();
            result.X = x;
            result.Y = y;
        }
示例#3
0
        public static Vector2Dec Transform(Vector2Dec position, Matrix matrix)
        {
            var        x      = (position.X * (decimal)matrix.M11) + (position.Y * (decimal)matrix.M21) + (decimal)matrix.M41;
            var        y      = (position.X * (decimal)matrix.M12) + (position.Y * (decimal)matrix.M22) + (decimal)matrix.M42;
            Vector2Dec result = new Vector2Dec();

            result.X = x;
            result.Y = y;
            return(result);
        }