Consider the following method that is intended to determine if the double values d1 and d2 are close enough to be considered equal. for example, given a tolerance of 0.001, the values 54.32271 and 54.32294 would be considered equal. a 7-line code segment reads as follows. line 1: forward slash, asterisk, asterisk, at, return true if d1 and d2 are within the specified tolerance, comma. line 2: asterisk, false otherwise. line 3: asterisk, forward slash. line 4: public boolean almost equal, open parenthesis, double d1 comma double d2 comma double tolerance, close parenthesis. line 5: open brace. line 6: forward slash, asterisk, missing code, asterisk, forward slash. line 7: close brace. which of the following should replace / * missing code * / so that almostequal will work as intended? responses
1. return ((d1 + d2) / 2) >= tolerance;
2. return ((d1 + d2) / 2) <= tolerance;
3. return Math.abs(d1 - d2) <= tolerance;
4. return (d1 - d2) <= tolerance;
5. return (d1 - d2) >= tolerance;