| 17 | #include <math.h> |
| 18 | #include <stdint.h> |
| 19 | struct Grad |
| 20 | { |
| 21 | double x, y, z, w; |
| 22 | Grad() { |
| 23 | x = 0; |
| 24 | y = 0; |
| 25 | z = 0; |
| 26 | w = 0; |
| 27 | } |
| 28 | Grad(double px, double py, double pz) { |
| 29 | x = px; |
| 30 | y = py; |
| 31 | z = pz; |
| 32 | } |
| 33 | |
| 34 | Grad(double px, double py, double pz, double pw) { |
| 35 | x = px; |
| 36 | y = py; |
| 37 | z = pz; |
| 38 | w = pw; |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | class SimplexIslands { // Simplex noise in 2D, 3D and 4D |
| 43 | // Inner class to speed upp gradient computations |
nothing calls this directly
no outgoing calls
no test coverage detected