Skip to content

Commit 1b8ecab

Browse files
fix: correct variable declaration for seed in fbm function
1 parent 1b78011 commit 1b8ecab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/terrain/terrain-nodes/mountain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { TerrainNode } from '@/types/terrain';
33
// Radial mountain profile with falloff and roughness
44
// h = peak * (1 - r^sharpness)^falloff + ridges
55
function fbm(x: number, y: number, seed: number, octaves: number, gain: number, lacunarity: number) {
6-
let sum = 0; let amp = 0.5; let freq = 1; let s = seed;
6+
let sum = 0; let amp = 0.5; let freq = 1; const s = seed;
77
const hash = (ix: number, iy: number) => {
88
const h = Math.sin((ix * 374761393 + iy * 668265263) ^ s) * 43758.5453;
99
return h - Math.floor(h);

0 commit comments

Comments
 (0)