INNER CODE UNIT · JavaScript

xi

paladin-t/bitty · lib/fast_noise/JavaScript/FastNoiseLite.js:1061

        let xi = x - i;
        let yi = y - j;

        let t = (xi + yi) * G2;
        let x0 = xi - t;
        let y0 = yi - t;

        i *= this._PrimeX;
        j *= this._PrimeY;

        let n0, n1, n2;

        let a = 0.5 - x0 * x0 - y0 * y0;

        if (a <= 0) {
            n0 = 0;
        } else {
            n0 = a * a * (a * a) * this._GradCoordR2(seed, i, j, x0, y0);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…