Recurity.Swf.BitStream.GetBitsFB C# (CSharp) Method

GetBitsFB() public method

public GetBitsFB ( UInt32 numberOfBits, double &result ) : void
numberOfBits System.UInt32
result double
return void
        public void GetBitsFB(UInt32 numberOfBits, out double result)
        {
            //
            // See FBtoInt32 for details
            //
            Int32 raw = this.GetBitsSigned(numberOfBits);
            UInt32 fraction = unchecked((UInt32)raw & 0xFFFF);
            double fract2 = (double)fraction / (double)0xFFFF;

            double h = raw >> 16;
            result = h + fract2;
        }

Usage Example

Exemplo n.º 1
0
        /// <summary>
        /// Parses this object out of a stream
        /// </summary>
        public void Parse(Stream input)
        {
            BitStream bits = new BitStream(input);

            bits.GetBitsFB(16, out this._alignmentCoordinate);
            bits.GetBitsFB(16, out this._range);
        }
All Usage Examples Of Recurity.Swf.BitStream::GetBitsFB