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

Support f64 and i32 #70

Closed
bitshifter opened this issue Aug 17, 2020 · 3 comments · Fixed by #117
Closed

Support f64 and i32 #70

bitshifter opened this issue Aug 17, 2020 · 3 comments · Fixed by #117
Assignees
Labels
discussion Feedback from users about this proposal is desired enhancement New feature or request

Comments

@bitshifter
Copy link
Owner

Once the glam API is stable (e.g. 1.0) I think it would make sense to add support for f64 and i32. I still would avoid using generics, since I couldn't easily provide SIMD implementation without specialisation, and even if specialisation was available it would complicate the API using generics. So perhaps some macros behind the scenes or just copy and paste. A lot of functionality is pretty simple so I don't think duplication is the end of the world, once the API is stable.

@bitshifter bitshifter added bug Something isn't working discussion Feedback from users about this proposal is desired enhancement New feature or request and removed bug Something isn't working labels Aug 17, 2020
@bitshifter
Copy link
Owner Author

bitshifter commented Nov 12, 2020

Primarily thinking of adding the following initially:

  • IVec2, IVec3, UVec2, UVec3 - these should be able to use the existing Vec2Mask and Vec3Mask types.
  • for f64 I would support everything you can do in f32 but SIMD would not be a high priority. I was planning on using a D prefix.

The other question is how to implement them behind the scenes. More code duplication? Macros? Learn to love generics? Certainly the easy approach to get it done is code duplication but it will become unmanageable eventually. So probably macros.

@bitshifter
Copy link
Owner Author

Current status of this has been done as part of #99 but I still have some things to tidy up.

bitshifter added a commit that referenced this issue Jan 12, 2021
Add support for `f64`, `i32`, `u32` primitive types.

Fixes #70.
Fixes #99.
@damccull
Copy link

damccull commented Jan 26, 2021

Is there a reason i64 and u64 were not included in the integers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Feedback from users about this proposal is desired enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants