no need for Double allocation just to get hashCode

This commit is contained in:
Dave Brosius 2016-05-29 17:45:02 -04:00
parent 292b6ab081
commit 803e1a6f4b
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ public final class MathUtils {
* @return the hash code
*/
public static int hash(double value) {
return new Double(value).hashCode();
return Double.hashCode(value);
}
/**