How can i check number is divisible by particular number or not both numbers are decimal. with decimal point value of two digits.
i had tried with below
(((dn / size) % 1) == 0)
but in some cases it not provide proper out put.
how can i resolve it. here i put some example values like
double dn = 369.35,369.55.370.55
and size may be 0.05,0.10,0.5
etc...
if(((dn / size) % 1) == 0) {
Log.d(TAG,"OK");
} else {
Log.d(TAG,"OK");
}
please help me to short out it.