MCPcopy Create free account
hub / github.com/carbonengine/trinity / perlin_wrap

Function perlin_wrap

trinity/Curves/Tr2ScalarExprKeyCurve.cpp:18–21  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: A wrapper for Perlin noise fractal sum function to pass to muParser. Arguments: x - agument for function a - octave scale multiplier b - octave frequency multiplier n - number of octaves Return Value: Perlin fractal sum --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

16// Perlin fractal sum
17// --------------------------------------------------------------------------------------
18static float perlin_wrap( float x, float a, float b, float n )
19{
20 return (float)( ( PerlinNoise1D( x, a, b, (int)n ) + 1.0 ) * 0.5 );
21}
22
23// --------------------------------------------------------------------------------------
24// Description:

Callers

nothing calls this directly

Calls 1

PerlinNoise1DFunction · 0.85

Tested by

no test coverage detected