Alexandria.Engines.Sciagi.Resources.PictureInstruction.ReadShortRelativeCoordinates C# (CSharp) Метод

ReadShortRelativeCoordinates() защищенный статический Метод

Read short relative coordinates from the stream.
protected static ReadShortRelativeCoordinates ( Stream stream, Vector2i to ) : Vector2i
stream Stream
to Vector2i
Результат Vector2i
        protected static Vector2i ReadShortRelativeCoordinates(Stream stream, Vector2i to)
        {
            var input = ReadByte(stream);
            to.X += ((input & 0x70) >> 4) * ((input & 0x80) == 0 ? 1 : -1);
            to.Y += (input & 0x07) * ((input & 0x08) == 0 ? 1 : -1);
            return to;
        }