Looks like the internal test of value range is done between a double and a float.
For a float -0.1 is stored as value=-0.100000001 and stored in a double as min=-0.10000000000000001
The double were used for the range and float was used for value to test.
Which fails the test: if ( (value>=min)&&(value<=max))
value is smaller than min
A simple solution would be to cast double to float before comparing the two values.
Looks like the internal test of value range is done between a double and a float. 100000000000000 01 =min)&& (value< =max))
For a float -0.1 is stored as value=-0.100000001 and stored in a double as min=-0.
The double were used for the range and float was used for value to test.
Which fails the test: if ( (value>
value is smaller than min
A simple solution would be to cast double to float before comparing the two values.