25.12.2017 10:40, drug пишет:
25.12.2017 09:50, Ali Çehreli пишет:
On 12/24/2017 02:10 AM, kerdemdemir wrote:
> if ( fabs(diff) < 0.0001 )
I can't answer your question but I know that the comparison above is
wrong because it can be meaningful only if the values are sufficiently
25.12.2017 09:50, Ali Çehreli пишет:
On 12/24/2017 02:10 AM, kerdemdemir wrote:
> if ( fabs(diff) < 0.0001 )
I can't answer your question but I know that the comparison above is
wrong because it can be meaningful only if the values are sufficiently
larger than that hard-coded v
On 12/24/2017 02:10 AM, kerdemdemir wrote:
> if ( fabs(diff) < 0.0001 )
I can't answer your question but I know that the comparison above is
wrong because it can be meaningful only if the values are sufficiently
larger than that hard-coded value.
I think feqrel() will be useful
In documentation and forums I found some example for overloading
opCmp for int values. But I couldn't see any examples for double
values.
That is what I come up with my own:
struct AdjustableVal ( T = double )
{
this ( T initVal )
{
curVal = initVal;