Skip to content

Commit 3065201

Browse files
committed
Includes TODO for constants equivalent to π/180
1 parent 6be9491 commit 3065201

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
@@ -665,6 +665,7 @@ fn check_radians(cx: &LateContext<'_>, expr: &Expr<'_>) {
665665
if let Some((rvalue, _)) = constant(cx, cx.tables(), div_rhs);
666666
if let Some((lvalue, _)) = constant(cx, cx.tables(), mul_rhs);
667667
then {
668+
// TODO: also check for constant values near PI/180 or 180/PI
668669
if (F32(f32_consts::PI) == rvalue || F64(f64_consts::PI) == rvalue) &&
669670
(F32(180_f32) == lvalue || F64(180_f64) == lvalue)
670671
{

0 commit comments

Comments
 (0)