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

Fix tilesize #2

Merged
merged 2 commits into from
Feb 10, 2023
Merged

Fix tilesize #2

merged 2 commits into from
Feb 10, 2023

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Feb 9, 2023

Copy link
Owner

@johanhelsing johanhelsing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@@ -19,8 +19,11 @@ pub struct Aabb {

type Key = (i32, i32);

fn key_from_point(point: Vec2) -> Key {
(point.x as i32, point.y as i32)
fn key_from_point<const TILE_SIZE: usize>(point: Vec2) -> Key {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitated to put this method inside SparseGrid2d ; you be the judge

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside is better 👍

@johanhelsing
Copy link
Owner

Merging now to fix the bug, in case people start using this. We can always move code around later 👍

@johanhelsing johanhelsing merged commit 9aff912 into johanhelsing:main Feb 10, 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