1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00

Initialize class/struct variables with default values in modules/

This commit is contained in:
Rafał Mikrut
2021-02-08 10:57:18 +01:00
parent 57e2822a05
commit f7209b459b
100 changed files with 533 additions and 772 deletions

View File

@@ -48,11 +48,11 @@ class OpenSimplexNoise : public Resource {
osn_context contexts[MAX_OCTAVES];
int seed;
float persistence; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
int octaves; // Number of noise layers
float period; // Distance above which we start to see similarities. The higher, the longer "hills" will be on a terrain.
float lacunarity; // Controls period change across octaves. 2 is usually a good value to address all detail levels.
int seed = 0;
float persistence = 0.5; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
int octaves = 3; // Number of noise layers
float period = 64.0; // Distance above which we start to see similarities. The higher, the longer "hills" will be on a terrain.
float lacunarity = 2.0; // Controls period change across octaves. 2 is usually a good value to address all detail levels.
public:
OpenSimplexNoise();