calculate-macro

Crates.iocalculate-macro
lib.rscalculate-macro
version0.1.0
sourcesrc
created_at2024-11-17 06:16:12.312485
updated_at2024-11-17 06:16:12.312485
descriptionExpand the bit number of the parameters in the calculation formula to obtain the result with the expected bit number.
homepage
repositoryhttps://github.com/thlstsul/calculate-macro
max_upload_size
id1450918
size22,452
THELOSTSOUL (thlstsul)

documentation

README

Expand the bit number of the parameters in the calculation formula to obtain the result with the expected bit number.

let a = u8::MAX;
let b = u16::MAX;
let result = calc!(a + b; u32);
assert_eq!(result, 65790u32);
Commit count: 1

cargo fmt