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

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -