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

Implement From<TilePos> for CubePos #470

Merged
merged 2 commits into from
Dec 17, 2023

Conversation

Piturnah
Copy link
Contributor

This PR just adds an API converting directly from a TilePos to a CubePos without having to go through an intermediate AxialPos. Because of the inline the codegen should be well optimised I think. This makes trait bounds better specifically (i.e. if I want a function taking P: Into<CubePos> then I can pass a TilePos without calling AxialPos::from).

I didn't add the borrow version (From<&TilePos>) as I saw a lot of the other structs had because I'm not really sure what it is for. If you want me to add it then let me know

@StarArawn StarArawn merged commit d6d8511 into StarArawn:main Dec 17, 2023
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

Successfully merging this pull request may close these issues.

2 participants