fi2b

Crates.iofi2b
lib.rsfi2b
version1.0.0
sourcesrc
created_at2024-01-19 07:33:47.52257
updated_at2024-01-19 07:33:47.52257
descriptionConvert floating point and integer numbers into bytes and put them into an array
homepage
repositoryhttps://github.com/2A5F/fi2b
max_upload_size
id1105045
size4,742
Package (2A5F)

documentation

README

fi2b

Rust version documentation LICENSE

Convert floating point and integer numbers into bytes and put them into an array

let a: &[u8] = &fi2b![1, 2, 1.0, -1.0];
assert_eq!(
    a,
    [1u8, 0u8, 0u8, 0u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 128u8, 63u8, 0u8, 0u8, 128u8, 191u8]
)
Commit count: 0

cargo fmt