Skip to content

use f32::to_bits / f32::from_bits in a few of the example#81

Merged
prokopyl merged 1 commit intoprokopyl:mainfrom
m4rch3n1ng:f32-to-bits-from-bits
Apr 29, 2026
Merged

use f32::to_bits / f32::from_bits in a few of the example#81
prokopyl merged 1 commit intoprokopyl:mainfrom
m4rch3n1ng:f32-to-bits-from-bits

Conversation

@m4rch3n1ng
Copy link
Copy Markdown
Contributor

in the examples with AtomicF32 replace the wrapper functions around u32::from_ne_bytes(f32.to_ne_bytes()) / f32::from_ne_bytes(i32.to_ne_bytes()) with just calls to f32.to_bits() / f32::from_bits(i32) (which produce the exact same code).

@prokopyl prokopyl merged commit cc2498f into prokopyl:main Apr 29, 2026
16 of 17 checks passed
@prokopyl
Copy link
Copy Markdown
Owner

Ah yes, that is indeed much better. Thank you!

@m4rch3n1ng m4rch3n1ng deleted the f32-to-bits-from-bits branch April 29, 2026 23:23
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