Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | 25-Apr-2025 | - | 7,834 | 3,844 | ||
tests/ | 25-Apr-2025 | - | 388 | 322 | ||
.cargo-checksum.json | D | 25-Apr-2025 | 2.2 KiB | 1 | 1 | |
Android.bp | D | 25-Apr-2025 | 1.9 KiB | 84 | 77 | |
Cargo.toml | D | 25-Apr-2025 | 1.3 KiB | 55 | 49 | |
LICENSE | D | 25-Apr-2025 | 10.6 KiB | 202 | 169 | |
LICENSE-APACHE | D | 25-Apr-2025 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | D | 25-Apr-2025 | 1 KiB | 26 | 22 | |
METADATA | D | 25-Apr-2025 | 389 | 18 | 17 | |
MODULE_LICENSE_APACHE2 | D | 25-Apr-2025 | 0 | |||
README.md | D | 25-Apr-2025 | 1.8 KiB | 59 | 38 | |
RELEASES.md | D | 25-Apr-2025 | 12.5 KiB | 308 | 215 | |
TEST_MAPPING | D | 25-Apr-2025 | 1.4 KiB | 69 | 68 | |
build.rs | D | 25-Apr-2025 | 160 | 8 | 5 | |
cargo_embargo.json | D | 25-Apr-2025 | 204 | 14 | 13 | |
rules.mk | D | 25-Apr-2025 | 500 | 19 | 10 |
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. 32 33The `FloatCore` trait is always available. `MulAdd` and `MulAddAssign` for `f32` 34and `f64` also require `std` or `libm`, as do implementations of signed and floating- 35point exponents in `Pow`. 36 37## Releases 38 39Release notes are available in [RELEASES.md](RELEASES.md). 40 41## Compatibility 42 43The `num-traits` crate is tested for rustc 1.60 and greater. 44 45## License 46 47Licensed under either of 48 49 * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) 50 * [MIT license](http://opensource.org/licenses/MIT) 51 52at your option. 53 54### Contribution 55 56Unless you explicitly state otherwise, any contribution intentionally submitted 57for inclusion in the work by you, as defined in the Apache-2.0 license, shall be 58dual licensed as above, without any additional terms or conditions. 59