better-num

Crates.iobetter-num
lib.rsbetter-num
version0.1.0
sourcesrc
created_at2023-08-18 23:04:43.635391
updated_at2023-08-18 23:04:43.635391
descriptionBetter numeric types in rust
homepage
repositoryhttps://github.com/adryzz/better-num
max_upload_size
id948392
size6,034,590
Lena (adryzz)

documentation

README

better-num

Rust numeric types that are easier to use

Note: due to space constraints, anything > 16 bits cannot be implemented, as it would take multiple gigabytes of space

NOTE: rustc or rust-analyzer may not like the size of some of these enum definitions, you have been warned.

Example:

use better_num::english::u8::U8English;

fn main() {
    dbg!(U8English::TwoHundredFiftyFour - U8English::TwoHundredThirtyFour);

    // Twenty
}

Check the examples folder for more examples.

Due to the large size of the definitions, and to improve compilation speed you have to select exactly the types you want to use as features.

For example, if i want the U16English type, i have to select the features english and u16.

Language support

  • English
  • French
  • German
  • Italian

more to be added

License

This code is licensed under the MIT license.

Commit count: 6

cargo fmt