Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructor? #6

Open
ufcpp opened this issue Apr 28, 2017 · 1 comment
Open

Constructor? #6

ufcpp opened this issue Apr 28, 2017 · 1 comment

Comments

@ufcpp
Copy link
Owner

ufcpp commented Apr 28, 2017

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

fanoI commented Apr 28, 2017

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;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants