BitFields
BitFields copied to clipboard
Constructor?
public DoubleView(Bit52 faction, Bit11 exponent, Bit1 Sign)
{
Value = 0;
Value |= (fraction & FractionMask) << FractionShift)
Value |= (fraction & ExponentMask) << ExponentShift)
Value |= (fraction & SignMask) << SignShift)
}
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;
}