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

Added projection unit tests #49

Merged
merged 2 commits into from
Jun 30, 2016
Merged

Added projection unit tests #49

merged 2 commits into from
Jun 30, 2016

Conversation

brunoabinader
Copy link
Member

@@ -39,7 +39,7 @@ struct Options {
const Tile empty_tile{};

inline uint64_t toID(uint8_t z, uint32_t x, uint32_t y) {
return (((1 << z) * y + x) * 32) + z;
return (((1ull << z) * y + x) * 32) + z;
Copy link
Member

Choose a reason for hiding this comment

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

what's the difference between 1ull and 1u and why would we use both?

Copy link
Member Author

Choose a reason for hiding this comment

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

ull stands for unsigned long long (usually 64-bit) and u is simply unsigned(usually 32-bit). These are used to tell the compiler we want those numbers to be contained in types that can hold them. In this specific case we use 64-bits because we return a uint64_t type.

@mourner mourner merged commit 0e5df63 into master Jun 30, 2016
@mourner mourner deleted the brunoabinader-utests branch June 30, 2016 07:14
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