Definition at line 107 of file noise.cpp.
107 {
108#if 0
109 switch(hash & 0xF) {
110 case 0:
return ((
x) + (
y))>>1;
111 case 1:
return ((-
x) + (
y))>>1;
112 case 2:
return ((
x) + (-
y))>>1;
113 case 3:
return ((-
x) + (-
y))>>1;
114 case 4:
return ((
x) + (
z))>>1;
115 case 5:
return ((-
x) + (
z))>>1;
116 case 6:
return ((
x) + (-
z))>>1;
117 case 7:
return ((-
x) + (-
z))>>1;
118 case 8:
return ((
y) + (
z))>>1;
119 case 9:
return ((-
y) + (
z))>>1;
120 case 10:
return ((
y) + (-
z))>>1;
121 case 11:
return ((-
y) + (-
z))>>1;
122 case 12:
return ((
y) + (
x))>>1;
123 case 13:
return ((-
y) + (
z))>>1;
124 case 14:
return ((
y) + (-
x))>>1;
125 case 15:
return ((-
y) + (-
z))>>1;
126 }
127#else
131 if(hash&1) { u = -u; }
132 if(hash&2) { v = -v; }
133
134 return AVG15(u,v);
135#endif
136}
uint16_t hash(int32_t x, int32_t y)
References x, y, and z.
Referenced by inoise16_raw(), inoise16_raw(), inoise16_raw(), and inoise16_raw().