Explorar o código

added inlineHash

ncannasse %!s(int64=12) %!d(string=hai) anos
pai
achega
3c1bfb0f45
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      hxd/Rand.hx

+ 4 - 0
hxd/Rand.hx

@@ -18,6 +18,10 @@ class Rand {
 	
 	// this is the Murmur3 hashing function which has both excellent distribution and good randomness
 	public static function hash(n, seed = 5381) {
+		return inlineHash(n, seed);
+	}
+	
+	public static inline function inlineHash(n,seed) {
 		n *= 0xcc9e2d51;
 		n = (n << 15) | (n >>> 17);
 		n *= 0x1b873593;