Skip to content

Commit

Permalink
missing NoiseFunction4D return type
Browse files Browse the repository at this point in the history
  • Loading branch information
satelllte authored and jwagner committed Oct 14, 2022
1 parent 12fabe6 commit c07ff59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simplex-noise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ export type NoiseFunction4D = (x: number, y: number, z: number, w: number) => nu
/**
* Creates a 4D noise function
* @param random the random function that will be used to build the permutation table
* @returns {NoiseFunction3D}
* @returns {NoiseFunction4D}
*/
export function createNoise4D(random: RandomFn = Math.random) {
export function createNoise4D(random: RandomFn = Math.random): NoiseFunction4D {
const perm = buildPermutationTable(random);
// precalculating these leads to a ~10% speedup
const permGrad4x = new Float64Array(perm).map(v => grad4[(v % 32) * 4]);
Expand Down

0 comments on commit c07ff59

Please sign in to comment.