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: pack rgb seems to be wrong #9 #10

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Conversation

stelzo
Copy link
Owner

@stelzo stelzo commented Aug 22, 2023

Casting f32 to u32 is not bitwise in Rust.

This PR uses safe bitwise reinterpretation of the type, which is equivalent to std::mem::transmute.

@stelzo stelzo linked an issue Aug 22, 2023 that may be closed by this pull request
@stelzo stelzo merged commit 3013f8e into main Aug 22, 2023
6 checks passed
@stelzo stelzo deleted the 9-pack_rgb-seems-to-be-wrong branch August 22, 2023 06:34
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.

pack_rgb seems to be wrong
1 participant