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

Replace ANKSign and demote ANKSigned to ANKSignedKit #129

Closed
oscbyspro opened this issue Jun 10, 2023 · 2 comments
Closed

Replace ANKSign and demote ANKSigned to ANKSignedKit #129

oscbyspro opened this issue Jun 10, 2023 · 2 comments
Labels
subtraction huh? where did it go?
Milestone

Comments

@oscbyspro
Copy link
Owner

I think AKNSign can easily be replaced by Swift.FloatingPointSign (or even Bool). The only commonly used operation is xor which maps to !=. ANKSigned is neat, on the other hand, but I think it belongs in ANKSignedKit (unsurprisingly). What I still have to decide is whether ANKFixedWidthInteger needs init methods like exactly(sign:magnitude:) outside of ANKSignedKit.

@oscbyspro oscbyspro added the subtraction huh? where did it go? label Jun 10, 2023
@oscbyspro oscbyspro added this to the v3.0.0 milestone Jun 10, 2023
@oscbyspro
Copy link
Owner Author

Also, init(exactly: ANKSigned<Magnitude>) and init(clamping: ANKSigned<Magnitude>) should be enough.

@oscbyspro
Copy link
Owner Author

oscbyspro commented Jun 10, 2023

Hm. FloatingPointSign is RawRepresentable so AND, OR and XOR are canon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtraction huh? where did it go?
Projects
None yet
Development

No branches or pull requests

1 participant