diff options
author | wtc%netscape.com <devnull@localhost> | 2003-05-14 21:41:24 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2003-05-14 21:41:24 +0000 |
commit | 2608d21c87a5a5a39e512b0b69a9a206cac91036 (patch) | |
tree | d165237d7c03d847549f90c628cc45a4322a2ad6 | |
parent | e18ed8d28e348d1cb611c267f4d78bc9d9cf3d13 (diff) | |
download | nspr-hg-2608d21c87a5a5a39e512b0b69a9a206cac91036.tar.gz |
Explain how the GOLDEN_RATIO constant was calculated. (Added a comment.)
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r-- | lib/ds/plhash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ds/plhash.c b/lib/ds/plhash.c index f02b5132..8cfce081 100644 --- a/lib/ds/plhash.c +++ b/lib/ds/plhash.c @@ -179,7 +179,7 @@ PL_HashTableDestroy(PLHashTable *ht) /* ** Multiplicative hash, from Knuth 6.4. */ -#define GOLDEN_RATIO 0x9E3779B9U +#define GOLDEN_RATIO 0x9E3779B9U /* 2/(1+sqrt(5))*(2^32) */ PR_IMPLEMENT(PLHashEntry **) PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key) |