BitFields icon indicating copy to clipboard operation
BitFields copied to clipboard

Constructor?

Open ufcpp opened this issue 8 years ago • 1 comments

    public DoubleView(Bit52 faction, Bit11 exponent, Bit1 Sign)
    {
        Value = 0;
        Value |= (fraction & FractionMask) << FractionShift)
        Value |= (fraction & ExponentMask) << ExponentShift)
        Value |= (fraction & SignMask) << SignShift)
    }

ufcpp avatar Apr 28 '17 09:04 ufcpp

Yes could be useful to create the Bitfield based on his components, probably another useful constructor could be one that takes its underlyng type as argument that is:

    public DoubleView(ulong value)
    {
        Value = value;
    }

fanoI avatar Apr 28 '17 18:04 fanoI