Parent Directory | Revision Log | Patch
revision 1.3 by tjl, Tue Aug 20 09:58:08 2002 UTC | revision 1.4 by tjl, Thu Sep 5 11:19:33 2002 UTC | |
---|---|---|
# | Line 39 namespace Perlin { | Line 39 namespace Perlin { |
39 | float par[3] = {arg1, arg2, arg3}; | float par[3] = {arg1, arg2, arg3}; |
40 | return noise3(par); | return noise3(par); |
41 | } | } |
42 | ||
43 | inline float smooth_step(float t) { | |
44 | if(t <= 0) return 0; | |
45 | if(t >= 1) return 1; | |
46 | return ( t * t * (3. - 2. * t) ); | |
47 | } | |
48 | inline float smooth_step(float t, float low, float high) { | |
49 | return smooth_step( (t-low) / (high-low) ); | |
50 | } | |
51 | } | } |
52 | #endif | #endif |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |