static public void assertEquals ( String message , float expected , float actual , float delta ) { if ( Float . compare ( expected , actual ) == 0 ) return ; if ( ! ( Math . abs ( expected - actual ) <= delta ) ) failNotEquals ( message , new Float ( expected ) , new Float ( actual ) ) ; }
Asserts that two floats are equal concerning a positive delta . If they are not an AssertionFailedError is thrown with the given message . If the expected value is infinity then the delta value is ignored .