From a70382b0e8bed265a1d314d9f6aae8f2dd48d20b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 28 Nov 2012 18:45:54 +0000 Subject: ex-protos moved to the Plugins folder git-svn-id: http://svn.miranda-ng.org/main/trunk@2545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Quotes/src/IsWithinAccuracy.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/Quotes/src/IsWithinAccuracy.h (limited to 'plugins/Quotes/src/IsWithinAccuracy.h') diff --git a/plugins/Quotes/src/IsWithinAccuracy.h b/plugins/Quotes/src/IsWithinAccuracy.h new file mode 100644 index 0000000000..5e39281719 --- /dev/null +++ b/plugins/Quotes/src/IsWithinAccuracy.h @@ -0,0 +1,15 @@ +#ifndef __C8C6FB80_D66B_4382_8FAB_E92C83F77BB8_IsWithinAcuracy_h__ +#define __C8C6FB80_D66B_4382_8FAB_E92C83F77BB8_IsWithinAcuracy_h__ + +inline bool IsWithinAccuracy(double dValue1, double dValue2, double dAccuracy = 1e-4) +{ + double dDifference = dValue1 - dValue2 ; + + if ((-dAccuracy <= dDifference) && (dDifference <= dAccuracy)) + return true ; + else + return false ; +} + + +#endif //__C8C6FB80_D66B_4382_8FAB_E92C83F77BB8_IsWithinAcuracy_h__ -- cgit v1.2.3