Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | 03-May-2024 | - | 7,521 | 3,792 | ||
tests/ | 03-May-2024 | - | 398 | 332 | ||
.cargo_vcs_info.json | D | 03-May-2024 | 94 | 6 | 6 | |
.gitignore | D | 03-May-2024 | 18 | 3 | 2 | |
Android.bp | D | 03-May-2024 | 3.4 KiB | 131 | 125 | |
Cargo.toml | D | 03-May-2024 | 1.2 KiB | 52 | 46 | |
Cargo.toml.orig | D | 03-May-2024 | 697 | 29 | 24 | |
LICENSE | D | 03-May-2024 | 10.6 KiB | 202 | 169 | |
LICENSE-APACHE | D | 03-May-2024 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | D | 03-May-2024 | 1 KiB | 26 | 22 | |
METADATA | D | 03-May-2024 | 632 | 24 | 22 | |
MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | |||
OWNERS | D | 03-May-2024 | 40 | 2 | 1 | |
README.md | D | 03-May-2024 | 2.1 KiB | 64 | 42 | |
RELEASES.md | D | 03-May-2024 | 10.6 KiB | 260 | 183 | |
TEST_MAPPING | D | 03-May-2024 | 1.4 KiB | 70 | 69 | |
build.rs | D | 03-May-2024 | 949 | 30 | 20 | |
cargo2android.json | D | 03-May-2024 | 294 | 16 | 15 |
README.md
1# num-traits 2 3[](https://crates.io/crates/num-traits) 4[](https://docs.rs/num-traits) 5[](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) 6[](https://github.com/rust-num/num-traits/actions) 7 8Numeric traits for generic mathematics in Rust. 9 10## Usage 11 12Add this to your `Cargo.toml`: 13 14```toml 15[dependencies] 16num-traits = "0.2" 17``` 18 19## Features 20 21This crate can be used without the standard library (`#![no_std]`) by disabling 22the default `std` feature. Use this in `Cargo.toml`: 23 24```toml 25[dependencies.num-traits] 26version = "0.2" 27default-features = false 28# features = ["libm"] # <--- Uncomment if you wish to use `Float` and `Real` without `std` 29``` 30 31The `Float` and `Real` traits are only available when either `std` or `libm` is enabled. 32The `libm` feature is only available with Rust 1.31 and later ([see PR #99](https://github.com/rust-num/num-traits/pull/99)). 33 34The `FloatCore` trait is always available. `MulAdd` and `MulAddAssign` for `f32` 35and `f64` also require `std` or `libm`, as do implementations of signed and floating- 36point exponents in `Pow`. 37 38Implementations for `i128` and `u128` are only available with Rust 1.26 and 39later. The build script automatically detects this, but you can make it 40mandatory by enabling the `i128` crate feature. 41 42## Releases 43 44Release notes are available in [RELEASES.md](RELEASES.md). 45 46## Compatibility 47 48The `num-traits` crate is tested for rustc 1.8 and greater. 49 50## License 51 52Licensed under either of 53 54 * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) 55 * [MIT license](http://opensource.org/licenses/MIT) 56 57at your option. 58 59### Contribution 60 61Unless you explicitly state otherwise, any contribution intentionally submitted 62for inclusion in the work by you, as defined in the Apache-2.0 license, shall be 63dual licensed as above, without any additional terms or conditions. 64