summaryrefslogtreecommitdiff
path: root/protocols/CurrencyRates/src/IsWithinAccuracy.h
blob: 558dbb87d3e1cd7ca8f8b50b9e8f13d413207361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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__