* Fractal/Fractional Brownian Motion (fBm) summation of 1D Perlin Simplex noise * * @param[in] octaves number of fraction of noise to sum * @param[in] x float coordinate * * @return Noise value in the range[-1; 1], value of 0 on all integer coordinates. */
| 406 | * @return Noise value in the range[-1; 1], value of 0 on all integer coordinates. |
| 407 | */ |
| 408 | float SimplexNoise::fractalX(size_t octaves, float x) { |
| 409 | float output = 0.f; |
| 410 | float denom = 0.f; |
| 411 | float frequency = mFrequency; |
| 412 | float amplitude = mAmplitude; |
| 413 | |
| 414 | for (size_t i = 0; i < octaves; i++) { |
| 415 | output += (amplitude * noiseX(x * frequency)); |
| 416 | denom += amplitude; |
| 417 | |
| 418 | frequency *= mLacunarity; |
| 419 | amplitude *= mPersistence; |
| 420 | } |
| 421 | |
| 422 | return (output / denom); |
| 423 | } |
| 424 | |
| 425 | /** |
| 426 | * Fractal/Fractional Brownian Motion (fBm) summation of 2D Perlin Simplex noise |
nothing calls this directly
no outgoing calls
no test coverage detected