diff --git a/src/Create.ts b/src/Create.ts index cdcb883b..e2d630f6 100644 --- a/src/Create.ts +++ b/src/Create.ts @@ -238,8 +238,8 @@ export class Noise extends Pt { */ noise2D() { - let i = Math.floor( this._n[0] ) % 255; - let j = Math.floor( this._n[1] ) % 255; + let i = Math.max(0, Math.floor( this._n[0] )) % 255; + let j = Math.max(0, Math.floor( this._n[1] )) % 255; let x = (this._n[0] % 255) - i; let y = (this._n[1] % 255) - j;