Please forgive the obvious "I should probably already know this" element to the question but I'm not seeing a method that I would run the division side of this evaluation through, to get the result to come back as true.
I'm looking for a function that would return the result as a float of specific precision, so that the following would work...
float a = 0.66;
if( magicPrecisionFunction(2.0f/3.0f , 2) == a){ //the 2 specifies the level of precision
//something
}
I realize that I can write this myself in 2 minutes, but I was hoping to find a Java native way to do this "properly".