浏览代码

added inlineHash

ncannasse 12 年之前
父节点
当前提交
3c1bfb0f45
共有 1 个文件被更改,包括 4 次插入0 次删除
  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;