51c83a7b02 | ||
---|---|---|
src | ||
.gitignore | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
build.rs |
README.md
Fixed-point numbers
The fixed crate provides fixed-point numbers. Currently it uses the typenum crate for the fractional bit count; it is planned to move to const generics when they are implemented by the Rust compiler.
The crate provides unsigned fixed-point numbers FixedU8
,
FixedU16
, FixedU32
, FixedU64
and FixedU128
, and signed
fixed-point numbers FixedI8
, FixedI16
, FixedI32
,
FixedI64
and FixedI128
.
Using the fixed crate
The fixed crate is available on crates.io. To use it in your crate, add it as a dependency inside Cargo.toml:
[dependencies]
fixed = "0.0.1"
You also need to declare it by adding this to your crate root (usually lib.rs or main.rs):
extern crate fixed;
License
This crate is free software: you can redistribute it and/or modify it under the terms of either
- the Apache License, Version 2.0 or
- the MIT License
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache License, Version 2.0, shall be dual licensed as above, without any additional terms or conditions.