mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
75d43aac73
Some accuracy lints for floating point operations This will add some lints for accuracy on floating point operations suggested by @clarfon in #2040 (fixes #2040). These are the remaining lints: - [x] x.powi(2) => x * x - [x] x.logN() / y.logN() => x.logbase(y) - [x] x.logbase(E) => x.log() - [x] x.logbase(10) => x.log10() - [x] x.logbase(2) => x.log2(). - [x] x * PI / 180 => x.to_radians() - [x] x * 180 / PI => x.to_degrees() - [x] (x + 1).log() => x.log_1p() - [x] sqrt(x * x + y * y) => x.hypot(y) changelog: Included some accuracy lints for floating point operations |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |