Definition at line 209 of file noise.cpp.
209 {
210#if 0
211 switch(hash & 0xF) {
212 case 0:
return ((
x) + (
y))>>1;
213 case 1:
return ((-
x) + (
y))>>1;
214 case 2:
return ((
x) + (-
y))>>1;
215 case 3:
return ((-
x) + (-
y))>>1;
216 case 4:
return ((
x) + (
z))>>1;
217 case 5:
return ((-
x) + (
z))>>1;
218 case 6:
return ((
x) + (-
z))>>1;
219 case 7:
return ((-
x) + (-
z))>>1;
220 case 8:
return ((
y) + (
z))>>1;
221 case 9:
return ((-
y) + (
z))>>1;
222 case 10:
return ((
y) + (-
z))>>1;
223 case 11:
return ((-
y) + (-
z))>>1;
224 case 12:
return ((
y) + (
x))>>1;
225 case 13:
return ((-
y) + (
z))>>1;
226 case 14:
return ((
y) + (-
x))>>1;
227 case 15:
return ((-
y) + (-
z))>>1;
228 }
229#else
230
231 hash &= 0xF;
232
233 int8_t u, v;
234
236
237#if 1
238 v = hash<4?
y:hash==12||hash==14?
x:
z;
239#else
240
241 if( hash < 4) {
243 } else {
244 if( hash==12 || hash==14) {
246 } else {
248 }
249 }
250#endif
251
252 if(hash&1) { u = -u; }
253 if(hash&2) { v = -v; }
254
256#endif
257}
LIB8STATIC_ALWAYS_INLINE int8_t avg7(int8_t i, int8_t j)
Calculate an integer average of two signed 7-bit integers (int8_t).
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().