mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
fixed height variable typo in fbm function
This commit is contained in:
@@ -194,11 +194,11 @@ we increase the frequency each level, decrease the amplitude, and calculate a ne
|
||||
float amplitude = 0.5;
|
||||
float frequency = 3.0;
|
||||
for (int i = 0; i < 6; i++){
|
||||
h += noise(x * frequency) * amplitude;
|
||||
height += noise(x * frequency) * amplitude;
|
||||
amplitude *= 0.5;
|
||||
frequency *= 2.0;
|
||||
}
|
||||
return h;
|
||||
return height;
|
||||
}
|
||||
|
||||
We can now use this noise function in place of ``cos`` and ``sin`` in the previous section.
|
||||
|
||||
Reference in New Issue
Block a user