c# - Using Double datatype for if Statement -


 double similarity = matcher.match(features1, features2);     if (similarity== ?? ) // sould write here      {        application.exit();   } 

if feature1 , feature2 matches application should exit please me

since double floating point type compare double using tolerance, e.g.

double tolerance = 0.001;  // instead of features1 == features2 if (math.abs(features1 - features2) <= tolerance) {   application.exit(); } 

Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -