Definition at line 183 of file noise.cpp.
183 {
184#if 0
185 switch(hash & 0xF) {
186 case 0:
return ((
x) + (
y))>>1;
187 case 1:
return ((-
x) + (
y))>>1;
188 case 2:
return ((
x) + (-
y))>>1;
189 case 3:
return ((-
x) + (-
y))>>1;
190 case 4:
return ((
x) + (
z))>>1;
191 case 5:
return ((-
x) + (
z))>>1;
192 case 6:
return ((
x) + (-
z))>>1;
193 case 7:
return ((-
x) + (-
z))>>1;
194 case 8:
return ((
y) + (
z))>>1;
195 case 9:
return ((-
y) + (
z))>>1;
196 case 10:
return ((
y) + (-
z))>>1;
197 case 11:
return ((-
y) + (-
z))>>1;
198 case 12:
return ((
y) + (
x))>>1;
199 case 13:
return ((-
y) + (
z))>>1;
200 case 14:
return ((
y) + (-
x))>>1;
201 case 15:
return ((-
y) + (-
z))>>1;
202 }
203#else
204
206
207 int8_t u, v;
208
210
211#if 1
213#else
214
215 if( hash < 4) {
217 } else {
218 if( hash==12 || hash==14) {
220 } else {
222 }
223 }
224#endif
225
226 if(hash&1) { u = -u; }
227 if(hash&2) { v = -v; }
228
230#endif
231}
LIB8STATIC_ALWAYS_INLINE int8_t avg7(int8_t i, int8_t j)
Calculate an integer average of two signed 7-bit integers (int8_t).
uint16_t hash(int32_t x, int32_t y)
static int8_t selectBasedOnHashBit(uint8_t hash, uint8_t bitnumber, int8_t a, int8_t b)
References avg7(), selectBasedOnHashBit(), x, y, and z.
Referenced by inoise8_raw(), inoise8_raw(), and inoise8_raw().