Skip to content

Commit 10a43d3

Browse files
committed
Includes TODO for constants equivalent to π/180
1 parent d18f96d commit 10a43d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clippy_lints/src/floating_point_arithmetic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
655655
if let Some((rvalue, _)) = constant(cx, cx.tables(), div_rhs);
656656
if let Some((lvalue, _)) = constant(cx, cx.tables(), mul_rhs);
657657
then {
658+
// TODO: also check for constant values near PI/180 or 180/PI
658659
if (F32(f32_consts::PI) == rvalue || F64(f64_consts::PI) == rvalue) &&
659660
(F32(180_f32) == lvalue || F64(180_f64) == lvalue)
660661
{

0 commit comments

Comments
 (0)