Examples of errors detected by the V3076 diagnostic.


V3076. Comparison with 'double.NaN' is meaningless. Use 'double.IsNaN()' method instead.


Old NASA World Wind (C#)

V3076 Comparison of 'icon.OnClickZoomAltitude' with 'double.NaN' is meaningless. Use 'double.IsNaN()' method instead. Icon.cs 389


public override bool PerformSelectionAction(DrawArgs drawArgs)
{
  ....
  if(icon.OnClickZoomAltitude != double.NaN ||
     icon.OnClickZoomHeading  != double.NaN ||
     icon.OnClickZoomTilt     != double.NaN)
  {
    ....
  }
  ....
}

Similar errors can be found in some other places:

  • V3076 Comparison of 'icon.OnClickZoomHeading' with 'double.NaN' is meaningless. Use 'double.IsNaN()' method instead. Icon.cs 389
  • V3076 Comparison of 'icon.OnClickZoomTilt' with 'double.NaN' is meaningless. Use 'double.IsNaN()' method instead. Icon.cs 389
  • V3076 Comparison of 'm_ShapeTileArgs.ScaleMin' with 'double.NaN' is meaningless. Use 'double.IsNaN()' method instead. ShapeFileLayer.cs 642
  • And 15 additional diagnostic messages.


Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
We use cookies for the analysis of events to improve our content and make user interaction more convenient. By continuing the view of our web-pages you accept the terms of using these files. You can find out more about cookie-files and privacy policy or close the notification, by clicking on the button. Learn More →
Do not show