Differences

This shows you the differences between two versions of the page.

Link to this comparison view

good_patch [2013/01/14 22:47] (current)
Line 1: Line 1:
 +====== And example of a good patch ======
  
 +<code>
 +diff -rupN minetest/src/noise.cpp minetest-modified/src/noise.cpp
 +--- minetest/src/noise.cpp 2011-06-23 00:57:58.650622230 +0300
 ++++ minetest-modified/src/noise.cpp 2011-06-23 00:57:47.540793100 +0300
 +@@ -206,4 +206,18 @@ double noise3d_perlin(double x, double y
 +  return a;
 + }
 + 
 ++double noise3d_perlin_abs(double x, double y, double z, int seed,
 ++ int octaves, double persistence)
 ++{
 ++ double a = 0;
 ++ double f = 1.0;
 ++ double g = 1.0;
 ++ for(int i=0; i<octaves; i++)
 ++ {
 ++ a += g * fabs(noise3d_gradient(x*f, y*f, z*f, seed+i));
 ++ f *= 2.0;
 ++ g *= persistence;
 ++ }
 ++ return a;
 ++}
 +</code>
good_patch.txt · Last modified: 2013/01/14 22:47 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki