public SimplexNoise(int seed) { _seed = seed; hash = new XXHash(seed); int i, j, k; for (i = 0; i < 256; i++) { perm[i] = i; } while (--i != 0) { k = perm[i]; j = hash.Range(0, 256, i); perm[i] = perm[j]; perm[j] = k; } for (i = 0; i < 256; i++) { perm[256 + i] = perm[i]; } }
public QualitativeNoise(int seed) { _seed = seed; hash = new XXHash(seed); int i, j, k; for (i = 0; i < B; i++) { m_perm[i] = i; } while (--i != 0) { k = m_perm[i]; j = hash.Range(0, B, i); m_perm[i] = m_perm[j]; m_perm[j] = k; } for (i = 0; i < B; i++) { m_perm[B + i] = m_perm[i]; } }