deepsourcestatus / test-repository

Consider using the constants from the Math class CS-R1071
Anti-pattern
Major
8 months ago8 months old
Do not use literals that can be replaced with the ones from Math class
16        // https://deepsource.io/directory/analyzers/csharp/issues/CS-W1000
17        var intro = $"My name is name";
18
19        var pi = 3.14;20        // CS-W1003: Invalid comparison against `NaN`.
21        // https://deepsource.io/directory/analyzers/csharp/issues/CS-W1003
22        var isNaN = pi == double.NaN;