Phyks 2014-10-27 22:20:34 +01:00
parent 775a8ab930
commit 5b4cc421df

View File

@ -134,9 +134,9 @@
} }
// From http://home.comcast.net/~bretm/hash/6.html // From http://home.comcast.net/~bretm/hash/6.html
a += a << 13; a += a << 13;
a ^= a >> 7; a ^= a >>> 7;
a += a << 3; a += a << 3;
a ^= a >> 17; a ^= a >>> 17;
a += a << 5; a += a << 5;
return a & 0xffffffff; return a & 0xffffffff;
} }
@ -144,9 +144,9 @@
function fnv_1a_b(a) { function fnv_1a_b(a) {
a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24); a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
a += a << 13; a += a << 13;
a ^= a >> 7; a ^= a >>> 7;
a += a << 3; a += a << 3;
a ^= a >> 17; a ^= a >>> 17;
a += a << 5; a += a << 5;
return a & 0xffffffff; return a & 0xffffffff;
} }