/*
* Derived from Joise, which is derived from the Accidental Noise Library.
* Licenses for these projects are as follows
*
* ============================================================================
* | Joise
* ============================================================================
*
* Copyright (C) 2016 Jason Taylor
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ============================================================================
* | Accidental Noise Library
* | --------------------------------------------------------------------------
* | Joise is a derivative work based on Josua Tippetts' C++ library:
* | http://accidentalnoise.sourceforge.net/index.html
* ============================================================================
*
* Copyright (C) 2011 Joshua Tippetts
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
package squidpony.squidmath;
/**
* More advanced noise functions, in 2D, 3D, 4D, and 6D, with the last two as options for generating seamlessly-tiling
* noise using {@link Noise#seamless2D(double[][], int, int, Noise.Noise4D)} and/or
* {@link Noise#seamless3D(double[][][], int, int, Noise.Noise6D)}. All functions can take an int seed that should
* significantly change the pattern of noise produced. Incorporates code from Joise; the full library is available at
* https://github.com/SudoPlayGames/Joise , and this class adds rather significant optimization in a few methods,
* especially 6D noise. Joise is derived from the Accidental Noise Library, available in C++ at
* http://accidentalnoise.sourceforge.net/index.html . Both Joise and ANL have many features that SquidLib has not (yet)
* incorporated, but now that SquidLib has seamless noise, that's a nice feature that would have needed Joise before.
*/
public class SeededNoise implements Noise.Noise2D, Noise.Noise3D, Noise.Noise4D, Noise.Noise6D {
protected final int defaultSeed;
public static final SeededNoise instance = new SeededNoise();
public SeededNoise() {
defaultSeed = 0x1337BEEF;
}
public SeededNoise(int seed)
{
defaultSeed = seed;
}
public double getNoise(final double x, final double y) {
return noise(x, y, defaultSeed);
}
public double getNoise(final double x, final double y, final double z) {
return noise(x, y, z, defaultSeed);
}
public double getNoise(final double x, final double y, final double z, final double w) {
return noise(x, y, z, w, defaultSeed);
}
public double getNoise(final double x, final double y, final double z, final double w, final double u, final double v) {
return noise(x, y, z, w, u, v, defaultSeed);
}
public double getNoiseWithSeed(final double x, final double y, final int seed) {
return noise(x, y, seed);
}
public double getNoiseWithSeed(final double x, final double y, final double z, final int seed) {
return noise(x, y, z, seed);
}
public double getNoiseWithSeed(final double x, final double y, final double z, final double w, final int seed) {
return noise(x, y, z, w, seed);
}
public double getNoiseWithSeed(final double x, final double y, final double z, final double w, final double u, final double v, final int seed) {
return noise(x, y, z, w, u, v, seed);
}
protected static final float[] gradient2DLUT = {0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1,
0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 0,
0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0,
-1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, 1, 0, -1,
1, 0, -1, 0};
protected static final float[] gradient3DLUT = {0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0,
-1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0,
1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0,
0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, -1,
0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0, 0, 0, 1,
0, 0, -1, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0, 0,
0, 0, 1, 0, 0, -1, 0, 1, 0, 0, -1, 0};
protected static final float[] gradient4DLUT = {
0.22552454980774f, 0.66749286953929f, 0.53967936463105f, -0.46080161668515f,
0.52981737633302f, 0.80705123608169f, 0.25001068952995f, 0.073868160904199f,
0.2551718844115f, 0.40169779308827f, -0.87581570003174f, 0.080455279577005f,
0.2446720608745f, -0.57667976542766f, -0.10969185644738f, 0.77171479667222f,
0.56152621692767f, -0.4292067323737f, 0.16103874251227f, -0.68886603341873f,
-0.47332175931021f, 0.093442231646057f, -0.75172946705559f, 0.44959745313871f,
0.36614231721753f, 0.4625818257178f, -0.50122840201262f, 0.63303076313402f,
0.50134394883212f, -0.32248055428503f, 0.80140206134118f, -0.049145428633102f,
0.23609302357006f, 0.78968939092939f, 0.46805407624526f, -0.31871010618635f,
0.3566224687564f, 0.82280076001748f, -0.42198348844058f, -0.13322634715498f,
0.53249173494918f, 0.35833499357915f, 0.62048711191207f, -0.45060440359416f,
-0.10495021075845f, -0.57318889402664f, -0.51484484295083f, -0.62878830516575f,
0.48320530716683f, -0.57172831979762f, -0.61957401150899f, -0.2361512306338f,
0.56139247202719f, -0.59285009197507f, -0.5563962302756f, 0.15424167961823f,
-0.12102422542118f, -0.49213994645356f, 0.4794977231538f, -0.7164030593571f,
-0.39415630019406f, -0.16750296810702f, -0.77313995219119f, -0.46780143332237f,
-0.077996875735257f, -0.72521264783548f, 0.21322391118796f, -0.65001435868195f,
0.36675239692246f, -0.32607458507754f, -0.86882175267727f, -0.065702407816875f,
0.54875576857984f, 0.35330602237706f, -0.70129121026282f, -0.28676226985181f,
-0.5812728198809f, 0.52878141440118f, -0.48813116423404f, -0.37978953534178f,
-0.22120336443784f, -0.50216367205327f, 0.23141872050005f, -0.80333435992336f,
-0.62382494805532f, -0.47276765886765f, -0.5623445209171f, -0.26664923533941f,
-0.34810294100203f, 0.77605534406345f, -0.015707133464448f, -0.52565742777462f,
0.69115837887353f, -0.3936531009971f, 0.089410248049089f, 0.59945236585744f,
0.3133597935846f, -0.79750731117234f, -0.24841572824554f, 0.45174921621572f,
0.15712455106329f, -0.49358619043723f, -0.56123861872675f, -0.64551976028044f,
0.12957880127654f, -0.537223110548f, -0.5612004467528f, 0.61616127946936f,
0.14715736388495f, -0.54550513683857f, 0.70400607913576f, -0.4302839719035f,
-0.27603940501488f, 0.66664669430619f, -0.20940134756402f, -0.65995114022784f,
-0.28542058243422f, -0.26629956698313f, -0.48526805245045f, 0.78239027922032f,
0.90830597179735f, -0.30802834137341f, 0.13130250877935f, -0.25071588241727f,
-0.68975034153593f, 0.29656664042552f, 0.66049372644302f, -0.0063821209016788f,
0.23754231359754f, 0.86360891835925f, -0.37634599141988f, -0.23689022800294f,
-0.3008221008451f, 0.71840381218331f, -0.19107614574202f, 0.59740432942188f,
-0.2544530858471f, 0.33459224995788f, 0.893299034533f, 0.15911784398182f,
-0.30908481589984f, -0.76069512866564f, -0.024337358188341f, 0.57027816966892f,
0.097288831244174f, 0.96921511737704f, -0.095017157071808f, -0.205252720871f,
0.63294540707629f, -0.14805006160837f, -0.42005382286916f, -0.6332583018104f,
-0.67195172729974f, -0.10550185088633f, 0.18728512185188f, -0.70871328389651f,
-0.69993983031639f, -0.27629564601678f, 0.47717744770779f, 0.45392359855806f,
0.45229382710377f, 0.10953589230206f, -0.86039839883114f, 0.20771802413423f,
0.57507084430014f, 0.49537901571099f, 0.63765893106374f, 0.13146954956864f,
0.49273255198119f, 0.7371708819457f, -0.29362806469134f, 0.35717822253761f,
0.65308805992157f, -0.50561647234808f, 0.37455865201808f, 0.42134758226026f,
0.015875966700541f, 0.70304296752082f, 0.628464130577f, 0.3324325135707f,
-0.61291521126741f, 0.30295474138901f, 0.43959142245302f, -0.5825055791773f,
0.28870150781935f, -0.055081790563628f, 0.65913922715236f, -0.69220872210637f,
-0.079733017226467f, -0.22918659811981f, 0.95837698208327f, -0.15043174338946f,
-0.35025365580024f, -0.58440279590723f, 0.61398669509432f, -0.39851736095375f,
-0.49583300276112f, 0.8320520239064f, 0.12466582301665f, -0.2151685280373f,
-0.57838068316419f, -0.20866225618262f, -0.25891317127095f, 0.74491598044996f,
0.24517181230967f, 0.87106847894657f, 0.38643251825943f, 0.178326656073f,
-0.032939982735198f, 0.72735694715047f, 0.59789863494626f, 0.33523730594724f,
0.46839767570091f, 0.28725504887534f, -0.82223460003592f, -0.14838603976579f,
-0.68530688721453f, 0.30062191695867f, -0.65188139443225f, 0.12260334813328f,
-0.09481691601797f, -0.72846602189708f, -0.47810363374399f, -0.48141865645099f,
-0.71095576728456f, -0.44889238701561f, -0.38663259872485f, 0.37888356449908f,
0.65266817536949f, -0.048437131039962f, 0.073940142453456f, 0.75246990141163f,
-0.58567515556267f, 0.80836413944392f, -0.052196260915081f, 0.028417961999587f,
0.4307524920894f, 0.78828122681196f, 0.28407778104785f, -0.33520861016616f,
-0.047152592626151f, 0.080906814134336f, 0.95331289758053f, -0.28709796192567f,
-0.092934311395387f, -0.93376149171941f, -0.1711922375466f, -0.30024308177073f,
0.35964306202515f, 0.79090749262634f, -0.44772535519024f, 0.21133909331798f,
0.78826512774619f, -0.22601198404862f, 0.57215985576402f, -0.013775735834394f,
0.090244004443892f, -0.73057802155678f, -0.077209310249513f, -0.6724213682587f,
-0.0054007086447244f, 0.64607993441819f, -0.46651331454209f, 0.60408350254189f,
-0.70185725868085f, 0.5369402202072f, 0.36637576194925f, -0.29130806617212f,
-0.32396804158331f, 0.70188757706857f, -0.30408596246687f, -0.55671380854088f,
0.56090670073868f, -0.48169400187882f, -0.66248222629843f, 0.12029905011714f,
-0.21148730570035f, -0.66324178429788f, 0.42537806814415f, -0.57830524312938f,
0.49184121803223f, -0.53433759959622f, 0.41996352447612f, -0.54424827423881f,
-0.62991318148171f, 0.6560831504895f, -0.018944460160231f, -0.41521728151487f,
-0.74278663987202f, -0.57070585901822f, -0.26473071464775f, -0.2290861821062f,
0.5025495101175f, -0.37409188240791f, 0.47531478480926f, 0.61771766102232f,
-0.22227660391851f, 0.082683771800495f, -0.17294940947311f, 0.95595240833119f,
0.47549422210941f, 0.27384409989549f, -0.73038192404162f, -0.40676393488884f,
0.59221657484784f, 0.050200153729467f, 0.70240850515692f, 0.3916398408286f,
0.89287935537108f, -0.18228187488468f, 0.20326879532789f, 0.35808039835574f,
-0.63303616764545f, -0.56090787852805f, 0.5182368140323f, 0.12679971151219f,
0.78287411316931f, 0.49854614640923f, 0.30404279624908f, -0.2147506481455f,
-0.41503470490899f, -0.6268605824938f, -0.35991041023467f, 0.55250022664371f,
-0.53157442679059f, 0.048919235389262f, -0.84511446630526f, -0.028584541849774f,
0.63177262851732f, -0.27840711796915f, 0.58586252075951f, -0.42440302695638f,
-0.44119538483073f, 0.5829738945766f, -0.51924450975423f, 0.44257565425174f,
0.61392386167432f, -0.58465170951844f, 0.20613607919186f, 0.48865917312527f,
0.24475051899163f, 0.30754543456076f, -0.15222721025769f, 0.90682956810601f,
0.41724992835443f, -0.13224180301206f, 0.89274161403018f, 0.10689720951984f,
-0.76873245399282f, 0.075325506550414f, -0.61855849417628f, 0.14408980367632f,
0.53191194272188f, 0.53084656080533f, 0.3798738941559f, -0.5394139770249f,
0.75910942848531f, 0.39530213014524f, -0.29984000888542f, 0.4214084367439f,
-0.03541957430639f, -0.62483127808284f, 0.75776450849439f, 0.18472757604531f,
0.4625891622941f, -0.2531420033374f, 0.56439885635973f, -0.63512543958985f,
0.660548158654f, 0.076935839301002f, 0.62489061261352f, 0.40898499849916f,
-0.13772992864036f, -0.35663701661207f, -0.70063282711493f, -0.60245675920161f,
0.3331436864299f, 0.15331116273714f, -0.48119522685978f, 0.79621738565511f,
0.71571654511597f, -0.26028084726799f, 0.52940810879996f, -0.37380578102748f,
-0.45879392024731f, 0.070422886390706f, -0.88044825819407f, -0.096745131451335f,
-0.3710610095712f, 0.49491399293823f, -0.19875303607171f, 0.76017833264453f,
0.67521169438188f, -0.21089530160678f, 0.30499481128614f, -0.63764449705041f,
0.37955387270282f, 0.37946220745499f, 0.64929517854168f, -0.53885346983406f,
-0.76118100241106f, -0.2502648698634f, -0.48213952651367f, 0.35427736796742f,
-0.81826013990967f, 0.29678177941379f, 0.27395924681324f, -0.4090443129155f,
-0.48735224983659f, 0.75897371421789f, 0.029778664412101f, 0.43076666172228f,
-0.42267571253102f, -0.28154084743402f, -0.55892959867618f, 0.65549805261817f,
-0.34623389175769f, -0.19627361980202f, 0.62165029251141f, 0.67464781344685f,
0.4829697897084f, -0.57358816947082f, 0.66156267623348f, 0.0084628297236668f,
0.74866979663621f, -0.0035805505812814f, -0.64318857973023f, -0.16059005625143f,
-0.090152317154269f, 0.6862809022405f, 0.64123846108899f, 0.33121642313131f,
-0.78321651600427f, -0.19115065168422f, -0.56201602070159f, 0.18485483465027f,
-0.73377708689206f, 0.0284256453642f, 0.67360273611538f, 0.08380049722821f,
0.49834502400233f, -0.35880739756757f, -0.78920001543545f, 0.0085337060880708f,
-0.8413442675025f, -0.49848949817935f, -0.033350567138177f, 0.20624205055503f,
0.62993466610518f, -0.0034911977529077f, -0.075714594190885f, -0.77294076629695f,
-0.17272033203772f, -0.29580796453879f, -0.37548041615855f, -0.86120833257558f,
-0.47432431050844f, -0.60995101955389f, -0.62418813212925f, 0.11560872767599f,
0.23618736517714f, -0.40605404979081f, 0.6180271784331f, 0.63037928574564f,
0.55500851198302f, 0.41920843999997f, -0.40467056584228f, -0.59369316031101f,
-0.17861281311101f, 0.6681171368602f, 0.72039649788735f, 0.052400765814444f,
0.051032005226464f, 0.77077381574869f, -0.21368401455548f, 0.59803227448209f,
-0.27130398085814f, -0.2356472352851f, 0.54860265705132f, 0.75491698560123f,
0.34863907202149f, -0.1008710712593f, 0.31299887927802f, -0.87767165045574f,
0.65671708149768f, 0.18729913477315f, 0.690161625609f, 0.23941311476012f,
0.21543450079531f, 0.62368781511756f, 0.6740194876821f, -0.33211325683525f,
-0.29368781227182f, -0.70194271867824f, 0.64731835728572f, -0.044753021557358f,
0.47957288380265f, -0.48010386819579f, -0.41528424196963f, -0.60584579163047f,
0.77465998420784f, 0.2064625496211f, -0.59762679675591f, -0.010832186775088f,
0.59374912564074f, 0.44398057182928f, -0.628531238492f, -0.23514189307461f,
0.29933292179378f, -0.13849303742408f, -0.75484941644759f, -0.56694077204253f,
0.67864785518517f, -0.66598612231715f, -0.20117390931759f, -0.23543286037301f,
0.41139382663025f, -0.50162129081774f, 0.76099758294395f, -0.0037254210934192f,
-0.63872455601276f, 0.22070744447973f, -0.66020520498325f, -0.32779300299205f,
0.29418192945737f, 0.76084869464354f, 0.56579367268056f, -0.12018226239594f,
0.57883638224948f, 0.54835864232767f, -0.58981423708497f, -0.12794689406458f,
-0.49577506786442f, -0.40376295003701f, 0.74730897396085f, -0.18086420237026f,
-0.23542938066082f, -0.82998760453564f, 0.044423043427579f, 0.50370643856465f,
0.51460246995974f, -0.20375144052087f, -0.58171443714984f, 0.59605197928405f,
-0.57420458168785f, 0.50828481072877f, -0.64181398835659f, -0.0032332492798049f,
-0.59114159943176f, -0.70202688911205f, 0.3951425902627f, -0.039650847978142f,
0.32348943025434f, 0.15426522631209f, 0.48865478831089f, -0.79547050625742f,
0.78091367446976f, 0.24332864387958f, -0.57453483550803f, 0.029575782012119f,
0.29640854502528f, 0.81484848881134f, 0.33564412795113f, 0.36811266494077f,
0.067881648517454f, 0.59549997670039f, 0.50990703475037f, -0.6170629428644f,
0.28894916793968f, -0.69198564828725f, 0.023585472505226f, 0.66114141180095f,
-0.48325755685412f, 0.44101587160833f, 0.32395739272709f, -0.68338769555092f,
-0.5710256256505f, -0.12907895901829f, -0.17172158524436f, 0.79232572490761f,
0.6847915554189f, 0.46529665784725f, 0.53390899832342f, 0.17175775770671f,
0.42165492939873f, 0.79428961452838f, 0.38934026723474f, 0.19931202943048f,
-0.63847181078f, 0.53274793784908f, 0.28633773611669f, -0.47596647196249f,
0.19156995438377f, -0.77779812107245f, -0.14338187979369f, -0.58118213322537f,
0.44339330307f, 0.062294908508799f, 0.49992742799503f, 0.74134626855797f,
0.11414857945734f, -0.80669520663252f, -0.039462641492769f, 0.57849429152793f,
0.51140504554998f, 0.77475373616074f, 0.37094692794394f, 0.024897878221959f,
-0.42141421118923f, 0.41042157807017f, -0.78825942772297f, -0.18058589498632f,
-0.61241893151874f, -0.31986126390856f, 0.71454099453741f, 0.10983164978162f,
0.42647810613114f, -0.16890980399214f, -0.58321474597059f, 0.670407684315f,
-0.62005519270376f, 0.24692971568815f, 0.55376487937289f, -0.49789731058161f,
-0.2357164754471f, 0.80976845323815f, -0.53339765737773f, -0.064805358166192f,
-0.45289067914353f, -0.60809715423324f, -0.18106295928925f, -0.62635779593756f,
-0.60064300362149f, -0.55194968809516f, 0.27130873161666f, 0.51085330199654f,
0.1788394866438f, -0.29721754352243f, -0.50108833389719f, -0.79283582882688f,
-0.65652402015051f, 0.42070413168568f, -0.54025124528414f, 0.31640612591564f,
0.43620946470649f, -0.1249196094834f, -0.27642429463064f, -0.84717530854301f,
0.2543621682741f, 0.27962706507339f, -0.8372594728531f, 0.39510146411661f,
-0.81374681782569f, -0.49558273399432f, -0.30261128321578f, 0.02530378461355f,
-0.67641647228818f, 0.48707240260253f, 0.33721313271051f, 0.43761688012207f,
0.28572653298411f, 0.63329777351537f, -0.019774894218509f, 0.71895982639366f,
0.65708200570959f, -0.34223476177811f, -0.041917555540789f, -0.67034433251936f,
0.071864648185965f, -0.59386186862736f, 0.59510615312859f, 0.53666769964292f,
-0.52113381082923f, 0.32294388060376f, -0.34686930359901f, -0.70979467975741f,
0.25004346113893f, -0.42478362076275f, -0.0072114313495278f, -0.87004892869956f,
-0.73610460974203f, 0.39085477297004f, 0.080434514738008f, 0.54672921890268f,
-0.096982051782443f, 0.12922152423063f, 0.59661992662453f, -0.78609219717672f,
-0.64487244725608f, -0.38386246316229f, -0.66001973035734f, 0.034104130013256f,
0.40625275106386f, 0.61435583542081f, -0.52718551420461f, -0.42379363297515f,
0.35878268156959f, -0.54570539388485f, 0.533316880214f, 0.53763715995969f,
0.74780942148728f, 0.59755384906022f, -0.26296181239253f, 0.12067125519944f,
0.011316905138058f, 0.067102377315201f, -0.065593365654346f, 0.99552333423124f,
0.49827563594909f, -0.084377896327059f, -0.53850763396471f, 0.67424868512491f,
-0.60044976118633f, -0.76761748085432f, -0.13587914428152f, 0.17821432469774f,
-0.089523490602341f, 0.050789198860078f, 0.84713826909812f, 0.52130869447859f,
0.46769441316167f, 0.50567662542845f, 0.70334020343911f, 0.175686210668f,
-0.072408203487527f, -0.31419198049473f, 0.093326787268646f, -0.94198225155181f,
-0.47533232374788f, 0.74785636631068f, 0.46059616621554f, 0.051197744448182f,
-0.76253271533295f, -0.055650486369972f, 0.42686845243099f, 0.48293913253423f,
0.55865209759069f, 0.49155664008023f, -0.11550774589067f, -0.65798013958615f,
-0.75641809583475f, 0.13770124300455f, 0.17748717881056f, 0.61430312820838f,
-0.61344640313317f, -0.71640963441606f, 0.33111243107609f, 0.028377881980612f,
-0.031294256698522f, -0.56229739591621f, -0.75650470039123f, -0.3324799938786f,
-0.31717913354911f, -0.35531289896521f, -0.26284619748583f, -0.83908403484825f,
-0.55737524479375f, -0.37655617201624f, -0.17745250976186f, 0.71836543109117f,
0.48847471582806f, 0.27948593392061f, 0.6728110320026f, -0.4802138897958f,
-0.2401291096457f, 0.022664846959043f, -0.38631652993552f, -0.89027178665375f,
0.28762309079035f, -0.16511988268503f, 0.68256059934388f, -0.65124450877502f,
-0.70891164838165f, 0.31807128215605f, -0.3269335982313f, 0.53794921377761f,
-0.69925979018203f, -0.69254454516254f, 0.1409638893828f, -0.10745687828272f,
-0.64120757688022f, -0.40145811379293f, -0.28410809936898f, -0.58903889013729f,
0.55206757527974f, 0.3654706551822f, -0.61301107780799f, -0.43112644434103f,
0.83974327448309f, -0.41693097107897f, 0.037330301823741f, 0.34584136085972f,
-0.29447692882523f, -0.65463017535059f, -0.54293549296166f, -0.43584827909789f,
-0.05333405362299f, 0.9970375499538f, 0.047225492146849f, -0.029006130347889f,
0.36963990470761f, 0.71417634995674f, -0.13865235293535f, 0.57800865654045f,
0.012132225757714f, -0.042395617365683f, 0.98893274157796f, 0.14165963914058f,
-0.58926155813878f, -0.12803001087421f, 0.79159291473138f, -0.098791648242605f,
-0.19438700623313f, 0.67901470490797f, -0.70701504134766f, -0.035811361809222f,
0.34532714734742f, 0.46443499574166f, 0.60148495729299f, 0.55069514450882f,
0.081003548026406f, 0.72421956716693f, -0.17809963017465f, 0.66122988851937f,
-0.51806271332971f, -0.47124904656651f, -0.64746889488023f, 0.30053184744748f,
-0.21613493655961f, -0.91660583460148f, -0.10703233312329f, -0.31884716219386f,
0.51867393084966f, -0.4936987587863f, 0.46464576962979f, -0.52090613146226f,
0.70188550832442f, -0.1818312879146f, -0.68784926160938f, -0.034022187509377f,
-0.18536271511511f, -0.6668126355463f, 0.023834990060033f, 0.72141074719593f,
-0.15031909443203f, -0.33262730296075f, -0.48817739687091f, -0.79274590907714f,
0.20243051601476f, -0.5429805329116f, 0.6054719468901f, 0.54552520436194f,
0.52537152557096f, -0.58327808848175f, 0.46508915228105f, 0.40922305903604f,
0.31485477581576f, 0.73539414558825f, -0.57616972550483f, 0.16760181440614f,
-0.1026518864305f, -0.84929281956374f, 0.44243387033807f, 0.26910326498838f,
0.027920771196629f, -0.51581324522376f, 0.27916735407976f, -0.80945828490641f,
0.52095648805607f, -0.31217499797683f, 0.78890796559237f, -0.093676731451121f,
-0.32665063346977f, -0.42237533445303f, -0.29678775049627f, -0.79171678752876f,
-0.64857997918119f, 0.22770551134203f, -0.62280006685563f, -0.37364995307697f,
-0.60407573890498f, -0.71425303787341f, -0.057839679785266f, 0.34869710494546f,
0.15576683671559f, 0.46059388821688f, 0.68108199108405f, -0.54746441358124f,
-0.42965263988294f, -0.4128555315267f, -0.80007348682047f, -0.069507803996135f,
0.62468470253348f, -0.55608652633181f, 0.44736045231719f, -0.31686814821852f,
-0.5887363856243f, 0.15029359337305f, 0.75607823697339f, 0.24320156991324f,
0.78882247105678f, -0.55978440598547f, -0.19260987829514f, -0.16523305587714f,
-0.2397762652948f, 0.50109182594502f, 0.26413811744859f, 0.7884449121423f,
-0.7830303555834f, -0.22084579025076f, -0.28393537655337f, -0.50741629960512f,
-0.73073108036106f, -0.028836092490741f, 0.67193346093654f, 0.11707259302706f,
0.024769701828925f, -0.022793005056951f, -0.61772537208025f, -0.78567315435879f,
-0.58543792858876f, -0.21000596085194f, -0.34309660713653f, -0.70387828944198f,
-0.73256166113309f, -0.39947841108428f, -0.55115200779339f, -0.0013696790967066f,
-0.65553402559555f, 0.71965699083607f, 0.18362339375227f, 0.13657015081697f,
0.21014780367008f, 0.93277837816337f, 0.091205127277356f, -0.27828766160555f,
-0.11787197549632f, -0.78483975651814f, 0.20342129122119f, 0.57336945528955f,
-0.6881964578452f, -0.22721428035754f, -0.50932656202979f, -0.46405361696881f,
-0.30800922001431f, 0.76151734782072f, 0.45056635743119f, -0.34958776709928f,
0.56307840922658f, 0.61616965967068f, -0.39982036117689f, 0.37871009275244f,
0.32091099001565f, 0.42988923391959f, 0.65069385181346f, 0.53740942888953f,
-0.65360317449729f, 0.21381907132369f, -0.37900175759245f, 0.6192269073346f,
0.34144172603729f, -0.68022974823899f, 0.36172522685587f, -0.53838638317427f,
-0.082427387138187f, -0.81983951792536f, -0.062698716423876f, 0.56314985719281f,
0.53660230478027f, -0.10888689641277f, 0.49610311211367f, 0.67385704154904f,
0.37828905310898f, 0.24829585477921f, 0.45837561130552f, 0.7649433702946f,
0.31077471220013f, -0.64394458615427f, -0.42742602417387f, -0.55322820072594f,
-0.74914861903498f, -0.44168063108052f, -0.42549539767358f, 0.2502962909931f,
0.63772244990386f, -0.68871779209415f, -0.16359297580573f, 0.30366958690097f,
-0.10823423405648f, -0.47886043588247f, 0.5951258423328f, 0.63624151492365f,
-0.58450908643191f, -0.23751295715095f, 0.68158351804545f, -0.37064893226977f,
-0.51170891961924f, 0.51317237144319f, -0.3868723565637f, -0.57020862716758f,
-0.65861950006955f, 0.33272485253463f, -0.34970834814331f, -0.57725089681422f,
0.67192193031742f, 0.52947366261195f, 0.23487166423469f, -0.46153424737329f,
-0.44355315014768f, 0.64728264624511f, 0.5825071861006f, -0.21206403986806f,
0.68832586073433f, -0.19106885563402f, -0.36416840615895f, -0.59756302914981f,
0.062746887857648f, 0.79955877089706f, 0.59681863174015f, -0.02400251556763f,
0.28392054221674f, -0.049695747604861f, -0.95198891214713f, 0.10313374581711f
};
protected static final float[] gradient6DLUT = {
0.31733186658157f, 0.043599150809166f, -0.63578104939541f,
0.60224147484783f, -0.061995657882187f, 0.35587048501823f,
-0.54645425808647f, -0.75981513883963f, -0.035144342454363f,
0.13137365402959f, 0.29650029456531f, 0.13289887942467f,
0.72720729277573f, -0.0170513084554f, 0.10403853926717f, 0.57016794579524f,
0.10006650294475f, -0.35348266879289f,
0.0524867271859f, 0.16599786784909f, -0.49406271077513f, 0.51847470894887f,
0.63927166664011f, -0.21933445140234f,
-0.57224122530978f, -0.089985946187774f, 0.44829955643248f,
0.53836681748476f, -0.051299333576026f, -0.41352093713992f,
-0.35034584363296f, -0.37367516013323f, -0.52676009109159f,
0.12379417201967f, 0.42566489477591f, 0.51345191723381f,
0.40936909283115f, 0.33036021753157f, 0.46771483894695f, 0.15073372728805f,
0.51541333179083f, -0.46491971651678f,
-0.64339751231027f, -0.29341468636474f, -0.50841617762291f,
-0.080659811936781f, -0.46873502824317f, -0.12345817650503f,
0.46950904113222f, 0.41685007896275f, -0.33378791988356f,
-0.39617029121348f, 0.54659770033168f, 0.19662896748851f,
-0.49213884108338f, 0.50450587466563f, -0.0073247243900323f,
0.57958418990163f, 0.39591449230465f, 0.10272980841415f,
0.34572956497624f, 0.62770109739866f, 0.12165109216674f, 0.35267248385686f,
0.34842369637704f, -0.47527514024373f,
0.076282233884284f, 0.56461194794873f, -0.392426730607f,
-0.20639693057567f, 0.33197602170266f, 0.60711436994661f,
0.46792592791359f, -0.38434666353171f, -0.46719345820863f,
-0.40169520060432f, -0.061343490026986f, 0.49993117813162f,
-0.25398819915038f, -0.82255018555745f, 0.40372967512401f,
0.21051604195389f, 0.020384827146984f, 0.22621006002887f,
0.23269489013955f, -0.42234243708413f, -0.18886779174866f,
0.44290933725703f, -0.40895242871151f, 0.60695810498111f,
-0.13615585122038f, 0.26142849716038f, 0.68738606675966f,
0.42914965171764f, 0.26332301994884f, 0.43256061294487f,
0.06145597366231f, -0.25432792035414f, 0.65050463165568f,
0.35622065678761f, -0.52670947710524f, -0.32259598080167f,
-0.28027055313228f, 0.30275296247348f, 0.39083872911587f,
0.17564171472763f, 0.25278203996272f, 0.76307625890429f,
-0.62937098181034f, -0.24958587788613f, 0.11855057687171f,
0.52714220921895f, 0.47759151204224f, -0.14687496867489f,
0.68607574135496f, 0.28465344118508f, 0.57132493696771f, 0.11365238375433f,
-0.32111327299854f, -0.076352560636185f,
0.42669573845021f, -0.1643996530281f, -0.54881376863042f,
-0.56551221465284f, 0.4027156095588f, -0.087880721039792f,
-0.30211042220321f, -0.47278547361731f, 0.050137867251391f,
0.46804387457884f, -0.39450159355792f, 0.55497099667426f,
0.31255895138908f, 0.034478918459459f, -0.079232996020732f,
0.39803160685016f, 0.82281399721198f, 0.24369695191021f,
-0.5524321671417f, 0.49350231710234f, 0.52530668244467f, 0.253625789825f,
0.26218499242504f, -0.20557247282514f,
0.060763010271891f, -0.023938406391206f, 0.36557410300471f,
0.55368747615095f, 0.25557899769702f, -0.70014279913759f,
0.36398574324757f, 0.049110464042478f, -0.2428951164628f,
-0.18733973495522f, 0.020130805835303f, 0.87784000694654f,
-0.62385490124849f, 0.020947599003133f, -0.44548631925386f,
-0.21069894502123f, -0.60559127508405f, 0.027809382425643f,
0.51562840479369f, -0.27416131751628f, -0.14365580420426f,
-0.46525735490594f, 0.16338488557607f, 0.62862302132303f,
0.52085189275139f, 0.51359303425374f, 0.021844789421786f,
0.53521775458267f, -0.23767218281397f, -0.34858599348565f,
0.12263603513069f, 0.53912951801629f, 0.57550729534804f,
-0.10335514143554f, 0.57524709075397f, 0.14662748040551f,
0.40942178494947f, 0.17197663954561f, -0.025238012475873f,
-0.20104824969996f, -0.60303014654018f, 0.63094779803243f,
0.051685704973311f, 0.23577798459204f, -0.19154992327678f,
-0.67743578708385f, -0.51070301615526f, 0.43047548181493f,
0.21373839204543f, -0.44348268823586f, 0.34347986958921f,
-0.49945694096162f, 0.45888698118478f, -0.42382317871053f,
-0.60376535923059f, -0.065300874745824f, 0.49448067868339f,
0.12358559784007f, 0.58623743735263f, -0.16656623971303f,
0.44140930948322f, -0.41692548571374f, -0.23774988226818f,
-0.27542786466885f, 0.39264397083621f, 0.58717642823542f,
-0.67860697457746f, 0.2070991391515f, -0.12832398784247f,
-0.58381216132288f, 0.24050209342748f, 0.2854077401022f,
-0.021324501342617f, 0.0098658783730532f, 0.2694901128571f,
0.42580554353158f, -0.82903198308789f, -0.24128534823695f,
-0.20344882384938f, 0.51719618805529f, 0.24379623299129f,
0.11303683173372f, -0.46058654895958f, -0.63777957124993f,
0.15686479897897f, -0.67777169905813f, -0.04974608057712f,
0.51313211803344f, 0.49928667286231f, -0.030863149692696f,
0.53527130791104f, -0.50102597915466f, -0.60754472649714f,
-0.25235098830686f, 0.13490559284448f, 0.10708155847142f,
-0.20613512232544f, 0.39533044356843f, -0.34422306275706f,
0.4792145528465f, -0.19178040223502f, -0.64521804411898f,
0.3304779611047f, 0.49148538926455f, -0.30004348427342f, 0.33473309391851f,
0.31079743137844f, 0.59208027276116f,
-0.52688857216953f, 0.40250311061529f, 0.38833191043333f,
0.50432308135853f, -0.33327489215794f, -0.21015252001231f,
-0.30306420816123f, -0.34460825415019f, -0.26894228639121f,
-0.58579646837355f, -0.51178483212848f, 0.33464319317466f,
-0.20258582390514f, -0.29195675136034f, 0.11887973573086f,
0.91211540292822f, 0.034118810787236f, -0.16269371903027f,
0.61207678339522f, -0.21883722070929f, -0.23415725333464f,
0.0041447691596985f, -0.34019274152454f, 0.6378827339521f,
0.11272999861808f, -0.54780877011146f, -0.62497664375172f,
-0.41373740141301f, 0.33306010353229f, 0.12039112788093f,
0.24918468395037f, -0.068734287809286f, -0.42234580029763f,
0.12235329631887f, -0.26545138767734f, 0.81815148205875f,
0.32048708659406f, -0.40233908147851f, 0.24633289057781f,
-0.37087758270512f, -0.55466799718133f, -0.47908728788262f,
-0.33748729653627f, -0.45507986822699f, -0.50597645316527f,
-0.2863701644881f, -0.5404199724601f, -0.22120318557996f,
-0.23520314824941f, 0.82195093398991f, -0.22661283339659f,
0.16382454786402f, -0.41400232366734f, -0.13959354720703f,
-0.30495751902889f, -0.47964557116121f, -0.68490238495876f,
-0.4324077675155f, -0.13521732523742f, -0.050887702629247f,
-0.56629250538137f, 0.19768903044f, -0.080075220953828f,
-0.29952637623112f, 0.095974426142512f, -0.73136356489112f,
-0.21316607993139f, 0.47585902758173f, -0.49429850443227f,
-0.24146904800157f, 0.45631329089651f, 0.46610972545109f,
0.12647584748018f, -0.10203700758813f, 0.20801341293098f,
0.66418891258418f, -0.65219775460192f, -0.2526141453282f,
-0.69345279552921f, 0.30149980453822f, -0.46870940095961f,
0.20092958919922f, -0.21817920622376f, 0.34721422759447f,
-0.69001417476102f, 0.09722776919634f, -0.37852252163632f,
-0.24995374433763f, 0.24829304775112f, 0.4970126640943f,
-0.82278510972964f, 0.050748830242865f, -0.3934733016285f,
0.00029980431140623f, -0.34677214869339f, -0.21301870187776f,
-0.51821811089111f, -0.22147302694699f, 0.53524316281446f,
0.12892242816244f, -0.5543955478928f, -0.26821451961648f,
-0.21006612796354f, 0.26079212570498f, -0.021870637510645f,
0.72402587064608f, -0.27651658712238f, 0.53544979218311f,
-0.099744280251479f, -0.4534212871731f, 0.71954978543864f,
-0.31082396323078f, -0.26933824624449f, 0.31233586755618f,
-0.48121951222937f, -0.43051247772929f, -0.5038415181805f,
0.12342710418307f, 0.037467829082858f, -0.55909965468017f,
-0.51180831908824f, -0.079955485578946f, -0.53046702060975f,
0.48748209854708f, 0.16148937559829f, -0.43191028009105f,
-0.38131649706702f, 0.46242477534251f, 0.46416075424014f,
-0.20634110277567f, -0.53778490132009f, 0.30582118902172f,
0.6245043069106f, 0.14316692963071f, -0.1436103838143f, 0.27519251589203f,
-0.60467865310212f, -0.35708047307373f,
0.52425890739441f, -0.20390682829262f, -0.33609142609195f,
0.51803372559413f, 0.28921536255925f, 0.46756035964091f,
-0.4455164148456f, 0.31831805515328f, 0.24217750314789f, 0.49821219078654f,
-0.47209418708575f, 0.41285649844363f,
-0.015857310429397f, -0.45214512052441f, -0.14591363373753f,
0.74070676188619f, 0.0098874230592725f, -0.47463489014478f,
0.24260837156464f, 0.44639366601915f, 0.31528570191456f, 0.45334773303464f,
-0.47964168123625f, -0.45484996397296f,
0.47123463487178f, 0.64525048646519f, -0.064257637508608f,
-0.18737730572971f, -0.11735335340515f, -0.55549853319118f,
-0.025197229767488f, -0.257963271803f, 0.26277107860996f,
-0.58236203161499f, -0.41893538667715f, 0.59086294196016f,
-0.48940330017687f, 0.33728563842186f, -0.057634928591543f,
0.44862021996899f, -0.40048256377746f, 0.53080564921806f,
0.73350664260388f, -0.021482988114587f, 0.016568147533453f,
0.0021905972927896f, 0.49384961731337f, 0.46619710394628f,
-0.25151229880228f, -0.62009962583403f, -0.26948657433033f,
0.31711936293198f, -0.35081923073755f, 0.50592112116981f,
0.0094298597779172f, -0.35925999444899f, 0.47529205807388f,
-0.26709475088579f, -0.53352146543694f, 0.53754630836074f,
-0.5948549517534f, -0.53195924881292f, -0.094383768924555f,
-0.41704491211939f, -0.41397531920841f, -0.09463944474724f,
-0.74917126125127f, -0.24166385705367f, 0.22864554725283f,
0.31721357549513f, 0.06066292638611f, -0.47303041351952f,
-0.3300396030254f, -0.08758658200966f, -0.096726092930468f,
-0.39607089556472f, 0.55566932028997f, 0.63906648027271f,
-0.58933068378397f, -0.38176870540341f, 0.46748019640554f,
-0.061358837959321f, 0.36268480315292f, -0.39127879224432f,
-0.066556695042975f, -0.73863083674701f, -0.32153946998935f,
0.57454599361106f, -0.090856896694743f, -0.09082394033963f,
-0.36335404704287f, -0.41643677881158f, -0.57839830999334f,
-0.030959887755637f, 0.5989792522053f, -0.016582566905843f,
0.23126668855143f, 0.2107790785413f, -0.14272193312959f,
-0.29232225134991f, -0.48451339172564f, -0.74934159314943f,
0.48188197979627f, -0.040214759215399f, -0.15667971883369f,
0.16054853668069f, -0.6083975436752f, -0.58796308779952f,
0.31319356064062f, -0.19280657835646f, 0.76136690598738f,
-0.084506239097717f, 0.4768786755523f, -0.22472488900872f,
0.67504537519138f, 0.36920158913876f, 0.40321048682396f,
0.034436041975613f, -0.29332731631919f, 0.39774172001359f,
-0.1459159803857f, -0.59726183207777f, -0.036384224081948f,
-0.65093487874945f, 0.39515711468056f, -0.20198429937477f,
0.60092128630869f, 0.18110182176699f, 0.2579491954112f, -0.39594768022975f,
0.15112959843347f, 0.59995268930018f,
-0.42310244265976f, -0.26937197256148f, 0.074700012546319f,
0.53119510349465f, 0.41614374632783f, 0.53618944036115f,
0.0071605427687482f, -0.69599782505338f, -0.053138604739257f,
-0.00054500262230378f, 0.69533871546989f, 0.1709263483943f,
0.12447149375466f, 0.33265313001972f, 0.35070015349473f, 0.53879932284829f,
0.37648083373421f, 0.56463759722353f,
0.29540077719054f, 0.04954124873475f, -0.48345087234985f,
0.72758494948264f, 0.070069102610626f, 0.377186640377f,
0.4882414260383f, 0.45135801463006f, 0.48450857902353f, -0.26042407965644f,
-0.4251358047458f, 0.2731053563007f,
-0.49806371818291f, -0.4719759672029f, 0.029647087810764f,
-0.13788472163255f, -0.45346141932978f, -0.5510470160674f,
-0.5359511936033f, -0.53585470245895f, 0.1771036246335f, -0.4537763243703f,
0.41838964069644f, 0.11527149720722f,
-0.36846431808379f, -0.46533180802325f, 0.65800816763703f,
-0.28691297783558f, 0.31521457275327f, 0.18178647457201f,
-0.29243126901345f, -0.4352956525447f, -0.58895978125929f,
-0.49649471729812f, 0.29271342931272f, 0.21433587621517f,
0.056256690265475f, -0.50387710054371f, 0.48145041862725f,
0.44723671964597f, -0.55771174894027f, -0.0092449146014199f,
-0.40973125164006f, -0.73147173623276f, -0.094076302480945f,
0.43033451471976f, 0.014334271843521f, -0.32066459724334f,
0.26752725373294f, 0.50477344684769f, 0.065069516529324f,
0.36001097578267f, 0.59393393889869f, -0.43247366096278f,
0.48945720845334f, 0.6043315650632f, 0.12458128550608f, -0.48327805813458f,
-0.25681943056744f, 0.28316179557217f,
-0.45182760404001f, 0.21574002665039f, -0.31462623994251f,
0.25279349500371f, 0.44865729380505f, -0.62058075048081f,
0.44017304540101f, 0.43789555905674f, 0.58423563606269f, 0.41842994331139f,
-0.26836655962348f, 0.16143005677844f,
-0.67897032028819f, -0.32730885869255f, -0.0243997359109f,
0.40649244381227f, 0.47711065295824f, -0.19596475712206f,
0.57441588138131f, 0.09386994843744f, 0.28400793066375f, 0.59394229842661f,
0.45349906020748f, 0.14881354725974f,
-0.3393739967757f, -0.54929055652002f, 0.26209493900588f, 0.0733800373509f,
0.56557076402003f, 0.43492125584075f,
0.050007991188197f, 0.74652764513134f, -0.36432144611385f,
-0.20993543754239f, -0.1352041047841f, 0.49508839805322f,
-0.041332158875019f, -0.20655741061568f, 0.52511282214888f,
0.047248635933477f, -0.6276121766011f, -0.5326844609727f,
-0.1889491176448f, 0.05188976739355f, -0.45677123586268f,
0.42884456750344f, 0.61612085530435f, -0.43526216197988f,
-0.65873541163911f, -0.094770059351695f, 0.40844030815782f,
0.35536013391048f, -0.16940065827957f, 0.48506226422661f,
-0.45779281442862f, -0.46052673126242f, 0.34138050378631f,
-0.54943270263121f, 0.37140594702643f, -0.14826175595089f,
-0.069378715405383f, -0.14845488608058f, -0.73991837897813f,
0.41519184526768f, -0.11098464009855f, -0.49088356499611f,
0.46422563805447f, 0.46130716873201f, -0.44207791495441f,
0.12050605352899f, 0.34969556083561f, -0.4893349322843f,
-0.35482925073362f, 0.28146983672487f, -0.35356606227648f,
-0.38774754218768f, 0.35979702647173f, -0.62454776976122f,
-0.48343191508515f, 0.41492185792886f, -0.50175316406656f,
0.21953122931153f, -0.54083165333237f, 0.041040952107647f,
-0.51280508048852f, -0.54131124436697f, -0.0099287129207481f,
0.23788701199175f, 0.4350333223576f, 0.44505087885649f,
0.2253837335044f, -0.30117119745248f, 0.46587685049056f,
-0.46672901001472f, -0.59182069765377f, 0.27086737661249f,
0.43015756480475f, -0.067851118947538f, -0.26917802105288f,
-0.57731860676632f, -0.53950120703807f, -0.33696522367557f,
0.20858352742161f, 0.63695057987625f, 0.49453142202915f,
-0.046235371593379f, -0.54436247241885f, -0.088075720520231f,
-0.35626464703623f, 0.067539543974725f, -0.18142793486226f,
-0.49044207117167f, 0.5542388249925f, 0.53654796190017f,
0.52238539932434f, 0.55175875223621f, 0.29070268774296f,
-0.14119026819648f, -0.55841587206055f, -0.080029639759127f,
-0.025988002903175f, 0.46612949273683f, -0.56880970348453f,
-0.44824563336003f, -0.030000490931808f, 0.50663523727173f,
0.047284583258099f, -0.26595723160738f, 0.21032033434131f,
0.52986834914146f, -0.52245334572957f, -0.5736534757312f,
-0.31924244568277f, -0.13888420092891f, 0.30725800370737f,
0.49792332552544f, 0.61035592292817f, -0.40487771982263f,
0.038758575627018f, -0.53813545398707f, -0.56167256912901f,
0.46815373895572f, -0.14142713486975f, 0.39276248966752f,
-0.19936871608885f, 0.12488860648831f, -0.62990029833727f,
-0.29296146144627f, 0.49734531468753f, 0.46335923993672f,
-0.078826705546604f, -0.15548800857414f, 0.57456768467721f,
0.5558854465212f, -0.56893054194692f, -0.082408823513622f,
0.11678856295109f, 0.53358760166951f, 0.49302489382249f,
-0.53981846952046f, -0.237913367643f, -0.33251226509871f,
0.39126928439834f, -0.39416116630681f, -0.35778844984527f,
-0.39395609960567f, 0.50270356681194f, -0.39448759513757f,
-0.17961290695406f, 0.34239532682819f, -0.21870225043453f,
-0.23322835296688f, 0.75997835134209f, 0.41317237364121f,
0.29699501400111f, 0.17195435585404f, -0.34903627841034f,
-0.31751884057854f, -0.59661546358767f, 0.55102732418683f,
-0.2237291316445f, -0.51254305965518f, -0.31277318571798f,
0.54270199705442f, -0.34885011313806f, 0.41616819064585f,
0.53534023676892f, 0.45905986582643f, -0.20308675275303f,
0.019523641323632f, 0.3378580580099f, 0.58898336258938f,
-0.045038463119119f, -0.52553334288797f, -0.6098545897634f,
0.46226027841702f, -0.36069029000651f, 0.077984430434637f,
-0.40129033029845f, 0.39526722066586f, -0.20379584931963f,
0.45466492237669f, 0.46504795737483f, -0.46712669863522f,
-0.43845831945339f, -0.59284534057943f, 0.050241908216277f,
-0.36494839821973f, 0.32363879325018f, 0.46458051299488f,
-0.46057360356064f, -0.34584626825548f, -0.12264748451482f,
0.48835437094478f, 0.21102526990984f, 0.60843919401837f,
-0.086047549693024f, -0.16981605114589f, -0.37222833669973f,
0.45158609930017f, -0.55710254634126f, 0.55759406480139f,
0.54697451263099f, -0.45070837355303f, 0.032962522247893f,
-0.48584332140086f, -0.28055687213837f, 0.42642516953676f,
0.34061925303691f, 0.38443007758012f, 0.61614808332652f,
-0.55774172327958f, -0.075660378162998f, 0.19938218730551f,
0.30626924920956f, -0.057939049897675f, -0.10461119704504f,
-0.4395638756485f, -0.57307193269415f, 0.60849886616281f,
-0.52519951444608f, -0.42567534157254f, -0.19896500097138f,
0.48819483593271f, 0.12539008064447f, 0.49932157157064f,
-0.10173361116951f, -0.07873850987854f, 0.3713554090283f,
0.65889542748449f, 0.63411890875068f, 0.096414235519521f,
0.60342393773609f, 0.057617370697663f, 0.35558841250938f,
0.20766418929404f, 0.030670189501999f, -0.67974377143949f,
-0.071971052874019f, -0.44567383014704f, 0.65917594080871f,
0.44113802003588f, -0.29627117199757f, 0.28160739274962f,
0.38284479693596f, 0.43552320173998f, -0.4282368470258f,
-0.54809258921772f, -0.27202273485667f, 0.32551612927831f,
-0.74755699288716f, -0.20979308948438f, 0.19268299390085f,
0.27864013929953f, -0.39085278833717f, 0.36001727246301f,
-0.64575536737195f, 0.59253747557756f, 0.040885512266333f,
-0.20167391777406f, -0.43481684011627f, -0.02212841779644f,
0.45874103754271f, -0.0066587566394561f, -0.30494054091993f,
0.52731059172348f, -0.64443887148677f, 0.056264275617853f,
0.61573773369959f, -0.00074622703454316f, 0.25455659350429f,
0.30670278147618f, -0.18573195942296f, 0.65383825999316f,
-0.089919562456316f, -0.28968403215216f, -0.60618287937171f,
0.53370861364121f, 0.37921556323246f, -0.33450055738044f,
-0.47481167613763f, 0.3899274103573f, -0.1047963185367f, 0.45545456567005f,
0.12142073778317f, 0.62397625076847f,
0.59154225785278f, -0.10812441303593f, -0.4685834521013f,
-0.36007270807588f, -0.1012374701199f, 0.52812407295968f,
-0.01292122984647f, -0.23607532114711f, -0.57680411110671f,
-0.44955815301222f, -0.31913443306122f, -0.55448100298376f,
0.54231398466289f, -0.31845386154668f, -0.38636423612049f,
0.22187979539931f, -0.6346425853783f, -0.056599490898788f,
-0.41950690366157f, -0.4578028963184f, 0.31139813874057f,
0.39787962066193f, -0.20885901240181f, 0.56172180435883f,
-0.031404881097728f, 0.56267475273157f, -0.5556815383811f,
0.33075363850824f, 0.39071115867626f, 0.3340294973255f,
-0.51485161085589f, -0.34037011091125f, -0.46826090820473f,
-0.60086679836276f, -0.075069409610657f, 0.18202033570633f,
-0.49669644859095f, 0.13236483793072f, 0.53440735955877f, 0.4720120049858f,
-0.05992551666341f, -0.47306929861073f,
-0.32796852486185f, 0.65593302097807f, 0.20800030327303f,
-0.38965914824176f, -0.51564565153044f, -0.034636725857177f,
-0.30473794783797f, 0.12584230588041f, 0.63911213518179f,
0.11269477188219f, 0.62944339013855f, 0.27191006392352f,
-0.53642197294029f, 0.50742224701512f, -0.22907820767928f,
0.47022559371179f, -0.1914125650624f, 0.38019261684316f,
-0.28865425091309f, 0.76169672032907f, -0.36166127667225f,
-0.30555403321368f, -0.12541657537884f, -0.31081403770203f,
0.0025978417989835f, 0.3737146483793f, -0.3151511957077f,
0.62032810853005f, 0.60524642517936f, -0.09939888944988f,
-0.40019833530022f, 0.15931480693456f, -0.61653030345628f,
-0.49479441153976f, -0.021517911098538f, -0.43481713333933f,
-0.26445143166732f, -0.48401155081335f, 0.27737058096082f,
-0.12537486208624f, -0.46956235249512f, 0.61859207953377f,
-0.49776294425122f, 0.6509513246149f, -0.20147785800704f,
0.26022926925791f, 0.39526195830317f, -0.25288299425858f,
0.20792543895216f, 0.6725599557329f, 0.013296712014115f,
0.069082404776847f, -0.37233547685047f, 0.60070560947898f,
-0.60329265885108f, 0.40708027238668f, -0.17229997007444f,
-0.52997954496878f, 0.22211745651394f, -0.33229784433365f,
0.61826884506104f, -0.62582169643111f, 0.33820439950773f,
0.23870919720066f, -0.20670655096227f, -0.10953969425599f,
-0.63678168786213f, -0.51101649337563f, -0.19131817442969f,
-0.49493417544846f, -0.22614515287593f, 0.025828539221376f,
0.7068462559507f, 0.072932806612059f, -0.30827034359477f,
-0.52659704221432f, -0.33954839093364f, 0.086145323573817f,
-0.52429050496975f, 0.39091424683727f, 0.52819210715237f,
-0.16569162349745f, 0.447191673089f, 0.25667977984796f,
0.85033978527922f, -0.37311666188152f, -0.031585518143925f,
-0.063546921071094f, -0.35026506762952f, 0.099923633151172f,
-0.43149574251927f, 0.16017753208259f, -0.36624037246965f,
0.49372029676385f, -0.60067103922455f, 0.2223896202103f,
-0.43599537393092f, -0.360658355506f, -0.42475053011196f,
-0.52301759011739f, 0.039454536357949f, 0.47362064109658f,
-0.35793170214797f, -0.43917817788312f, -0.49072242572643f,
-0.32880277826743f, -0.38509560837703f, -0.42636724894184f,
-0.043679644403255f, 0.74697226557232f, -0.40732954428872f,
-0.48088968590275f, 0.18029290312902f, -0.10220931735307f,
-0.058902573502295f, 0.0082595236590186f, 0.7136596141971f,
-0.53043791172483f, 0.22906331492979f, 0.39155822265168f,
0.43459649233879f, 0.18964470832196f, 0.15217427204218f, 0.59694624534505f,
0.053786588105393f, 0.62671041756872f,
-0.48833575031057f, 0.068909881680922f, 0.60168404074737f,
-0.055455043023162f, -0.62426261497771f, -0.044461939113733f,
-0.71822145541427f, 0.054494951105527f, 0.25733756171599f,
-0.42706881935297f, -0.44024663347316f, 0.19687748949208f,
0.4723221071836f, 0.63009683957253f, 0.2166256995021f, 0.31063720960745f,
0.079455887335627f, 0.47974409023622f,
-0.39506538843406f, 0.42517729990346f, 0.29375773990216f,
0.044503633424429f, -0.46173213926286f, 0.60139575234582f,
-0.40354126620316f, 0.41304136826673f, -0.29533980868045f,
-0.45300699221804f, 0.23702354154238f, -0.56385297528377f,
-0.62315380378984f, -0.42397903326965f, 0.53044082394843f,
0.37874432092957f, 0.054922713129263f, 0.063952196248596f,
0.41959045692314f, -0.83420441875842f, -0.25505372502578f,
0.25012310515014f, 0.010974237503127f, 0.017675743681809f,
-0.25231575134089f, -0.17034034508503f, -0.0022254428444259f,
-0.4967771056787f, 0.43184899693064f, -0.68850194407078f,
-0.1852812882862f, -0.48330898597592f, 0.13528868642679f,
0.15202104844417f, 0.57661281495368f, -0.59848767913131f,
0.64287473226568f, -0.30923674494923f, 0.22234318117192f,
0.099248962994541f, 0.64370450011427f, 0.13206961744112f,
-0.49018899717866f, 0.68654120859156f, -0.27238863334662f,
-0.085832423495263f, 0.44161945604453f, 0.10856057983467f,
0.48795432482822f, 0.42184193883513f, -0.43797315744756f,
0.35186997012044f, -0.46483432791096f, 0.22857392808385f,
0.52970834834669f, -0.50684486922008f, -0.39782161731912f,
-0.3932709335414f, -0.34863027587322f, 0.16748196501934f,
-0.46048505533f, -0.3887126918161f, -0.68287320410729f, -0.18448530888361f,
-0.25358256326157f, 0.26870280714361f,
0.6889557358588f, -0.3101022706485f, -0.35882194962822f, 0.30088738418801f,
-0.039139540883101f, -0.45646277242166f,
-0.21954767479275f, 0.40838837410593f, 0.23284186868997f,
0.30349649888064f, 0.57233263099925f, 0.55778817953937f,
0.57731035290905f, 0.091218309942656f, 0.70670016667131f,
0.016358033634041f, 0.3939245235472f, -0.059352634867484f,
0.50055570130024f, -0.021749790970703f, 0.56767851040093f,
0.50580176326624f, 0.34691320957643f, 0.22478399991032f,
-0.37901911159632f, 0.53804099887537f, -0.46780195460858f,
0.51497346779204f, -0.27981005467588f, 0.067278440906787f,
0.67241900483514f, 0.074099582737f, 0.43138117954806f, 0.054567519697911f,
-0.37927768894619f, 0.45764946429346f,
0.14529189179172f, -0.23854982910384f, 0.45401647091062f,
0.25466539906731f, 0.46182069803887f, -0.66160446396375f,
-0.15570980059397f, -0.38476787034627f, 0.37322840954917f,
-0.43977613626294f, -0.61243005550684f, -0.34631643815896f,
-0.19590302894013f, 0.42065974653653f, 0.43447548638809f,
-0.10575548452794f, 0.70439951675651f, -0.29754920754254f,
-0.13558865796725f, 0.1427073453776f, 0.49647494823192f,
-0.65533234019218f, -0.11714854214663f, 0.5211321311867f,
-0.6228374766114f, 0.20812698103217f, -0.16205154548883f,
0.20384566967497f, -0.59321895467652f, 0.38604941246779f,
0.44487837128099f, -0.37224943035393f, -0.22188447638327f,
0.48921538939858f, 0.41432418029434f, -0.45087099253189f,
0.66422841315008f, 0.21517761068003f, 0.094012579794123f,
-0.4358159040875f, 0.22245680154647f, -0.51404116085847f,
-0.11369362736032f, 0.32284689991698f, -0.38818285117689f,
0.49680024166881f, 0.047684866166158f, -0.69503480904222f,
-0.5137200731924f, -0.50673230867252f, 0.32715252974108f,
-0.26799714004956f, -0.47616510509846f, 0.27153195326233f,
-0.47315177716491f, -0.45711495983609f, -0.31178280842352f,
-0.51697763052226f, -0.14302372043059f, -0.42689944315384f,
-0.050442035795027f, 0.23609184251469f, 0.38634880236106f,
0.56012774305243f, 0.38963669840218f, -0.57174382424149f,
-0.15472134925391f, -0.15333579424307f, -0.14189768300467f,
0.032279269476252f, -0.66054298438621f, -0.70360180527557f,
-0.10345191679557f, -0.30503725808375f, 0.31038263802383f,
0.36878846502877f, -0.76824774853417f, 0.2714830658427f,
-0.060212868606223f, -0.4172755444983f, 0.39199300681258f,
-0.44040104260082f, 0.24955102139032f, -0.64215903203727f,
0.25443195353315f, -0.013789583113498f, 0.44365000614699f,
0.53296203342425f, -0.55057750350733f, -0.38867053403178f,
-0.36068564301268f, -0.65616661625162f, -0.48495997865466f,
0.24088316031012f, -0.18080297655217f, -0.33682435258394f,
-0.53824550487673f, -0.096728907851005f, -0.5208619866167f,
0.33195321221408f, -0.032263947064791f, 0.56427315050798f,
0.40151657866643f, -0.44825725748635f, -0.54910020122855f,
-0.095936272447708f, 0.5719563905078f, 0.00097783623607218f,
0.21961099467771f, 0.62823723408945f, -0.010045934028323f,
-0.6610564872634f, -0.17161595423903f, -0.30089924032373f,
0.27961471530636f, 0.054523395513076f, 0.61485903249347f,
0.11958885677663f, -0.61032561244673f, -0.39241856813031f,
-0.30223065341134f, -0.23605925177166f, -0.09697276975263f,
-0.46458104180761f, -0.37853464945647f, 0.69599203908657f,
0.0023635513043496f, 0.62702100484886f, 0.49658954056984f,
-0.20369645124455f, -0.56457560315907f, 0.00021299797811461f,
-0.64198493892962f, 0.59676262320476f, 0.46274573284143f,
0.088421912306785f, 0.098029994490406f, -0.012953072012707f,
-0.053965435026011f, 0.13439533803278f, -0.33103493780685f,
0.55991756423782f, -0.58127599631056f, -0.46696041830103f,
-0.43965993689353f, 0.07544961763381f, 0.1509639518808f,
-0.38868406689028f, -0.0033436054452783f, -0.79191533434483f,
-0.21743914630025f, -0.32019630124298f, -0.56067107727615f,
0.027284914419519f, -0.49444926389798f, -0.53908992599417f,
-0.36492599248168f, 0.52529904803377f, 0.18002253442693f,
0.14829474115897f, 0.17212619314998f, -0.71194315827942f,
0.0051876209353066f, 0.50490293404098f, 0.24361032552454f,
0.13688117617809f, -0.61381291176911f, -0.5386997104485f,
0.66421180843392f, 0.21833854629637f, -0.087909936660014f,
0.15624552502148f, -0.68780724971724f, 0.077015056461268f,
0.52710630558705f, -0.42143671471468f, -0.069964559463205f,
-0.24196341534187f, -0.68814841622245f, 0.08695091377684f,
0.62392249806692f, -0.23663281560035f, -0.59058622185178f,
0.22685863859977f, -0.36683948058558f, -0.14105848121323f,
0.18069852004855f, -0.083828559172887f, 0.66240167877879f,
0.16722813432165f, -0.25503640214793f, -0.65462662498637f,
-0.37112528006203f, 0.43100319401562f, -0.11342774633614f,
0.14418808646988f, 0.5753326931164f, 0.55842502411684f,
0.55378724068611f, 0.21098160548047f, -0.3224976646632f, 0.31268307369255f,
-0.37624695517597f, -0.55269271266764f,
0.2601465870231f, 0.56373458886982f, -0.21638357910201f, 0.41216916619413f,
-0.25078072187299f, -0.57873208070982f,
0.11217864148346f, 0.54196554704815f, -0.31989128683717f,
0.54691221598945f, 0.24062434044524f, 0.48409277788476f,
0.087564423746579f, -0.12083081671284f, 0.69931172084498f,
0.35220575672909f, 0.28770484569954f, -0.53091668762919f,
0.3395702120398f, 0.042520943289575f, -0.30935928261896f,
0.61022210846475f, 0.54650816974112f, 0.34079124619266f,
0.32746112891934f, 0.32095220193351f, -0.61142534799442f,
0.32197324480666f, -0.38236071343678f, 0.40749411210419f,
0.58741915356593f, -0.30916030490652f, -0.57642977381104f,
-0.038846190358607f, 0.047926713761208f, -0.4725265742377f,
0.026224389898652f, 0.031768907187292f, -0.12510902263321f,
0.36102734397001f, -0.72217212865059f, 0.57513252722531f,
-0.27510374152496f, -0.5153402145828f, 0.025774022629799f,
0.59201067073603f, 0.40728366085253f, -0.37645913420642f,
-0.29983338495183f, -0.61017291361195f, -0.18551919513643f,
0.50515945610161f, 0.18206593801497f, -0.46372136367049f,
-0.64290893575119f, -0.34887011406157f, -0.55318606770362f,
-0.21230198963112f, -0.19828983785672f, 0.2730419816548f,
-0.32778879906348f, -0.094317293167129f, 0.57811170538439f,
0.54346692190204f, 0.17699503497579f, -0.47197676839855f,
-0.075738705663962f, 0.53381750682665f, -0.13406342524856f,
0.71765386263773f, 0.34271060834977f, 0.24259408122628f,
-0.30574273227855f, 0.17419449782542f, -0.78861555508124f,
0.43305678368813f, 0.064853328282818f, 0.25003806266734f,
0.4397035983709f, -0.51651518914239f, -0.3972346186176f,
-0.34513492086703f, 0.32129829777342f, -0.39965829527563f,
-0.25184899643619f, -0.35937572373004f, 0.15273239148905f,
-0.51640931868766f, 0.4218715745627f, -0.58261460582976f,
-0.57396000790758f, 0.1912786199605f, 0.45995634753032f,
-0.43664716984512f, 0.4601630113166f, 0.14146310231856f,
0.11500068018889f, 0.05112652754666f, -0.25672855859366f,
-0.54715738035577f, 0.67669928552409f, 0.40118355777989f,
-0.45252668004418f, -0.40809988524453f, -0.064931545867856f,
0.19116562077283f, 0.76523014995576f, 0.048337406798767f,
-0.080075651760374f, 0.75305314115418f, 0.34797424409913f,
0.29104493928016f, 0.0040185919664457f, -0.46977598520425f,
-0.3890257668276f, 0.49100041230416f, -0.17812126809985f,
-0.43787557151231f, -0.46923187878333f, 0.40489108352503f,
0.37433236324043f, -0.29441766760791f, -0.066285137006724f,
0.33217472508825f, 0.73917165688328f, 0.33479099915638f,
-0.02973230696179f, -0.51371026289118f, 0.34133522703692f,
-0.41361792362786f, -0.51561746819514f, -0.4263412462482f,
0.51057171220039f, -0.23740201245544f, 0.26673587003088f, 0.5521767379032f,
0.16849318602455f, 0.52774964064755f
};
protected static final int[] SIMPLEX = {0, 1, 3, 7, 0, 1, 7, 3,
0, 0, 0, 0, 0, 3, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 3, 7, 0, 0, 3, 1, 7, 0, 0, 0, 0,
0, 7, 1, 3, 0, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 7, 0, 0, 0, 0,
1, 7, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 7, 0, 1, 3, 7, 1, 0, 1, 0, 3, 7, 1, 0, 7, 3,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 7, 1,
0, 0, 0, 0, 3, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 1, 3, 7, 0, 3, 1,
0, 0, 0, 0, 7, 1, 3, 0, 3, 1, 0, 7, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 7, 1, 0, 3, 0, 0, 0, 0,
7, 3, 0, 1, 7, 3, 1, 0};
/**
* Possibly useful outside SeededNoise. An unrolled version of CrossHash.Wisp that only generates 8 bits.
* @param x an int to incorporate into the hash
* @param y an int to incorporate into the hash
* @param seed an int to incorporate into the hash
* @return a pseudo-random-like int between 0 and 255, inclusive on both
*/
//0x89 0x95 0xA3 0xB3 0xC5 0xD3 0xE3
/*
public static int hash(final int x, final int y, final int seed) {
return ((x ^ 0x9E3779B9 * (seed + y))
+ (y ^ 0x632BE5AB * (x + seed))
+ (seed ^ 0x632BE5AB * (y + x))) >>> 24;
}
*/
public static int hash(final int x, final int y, final int seed) {
int a = 0x632BE5AB;
return (0x9E3779B9
+ (a ^= 0x85157AF5 * seed + x)
+ (a ^= 0x85157AF5 * x + y)
+ (a ^= 0x85157AF5 * y + seed)) * a >>> 24;
}
/**
* Possibly useful outside SeededNoise. An unrolled version of CrossHash.Wisp that only generates 8 bits.
* @param x an int to incorporate into the hash
* @param y an int to incorporate into the hash
* @param z an int to incorporate into the hash
* @param seed an int to incorporate into the hash
* @return a pseudo-random-like int between 0 and 255, inclusive on both
*/
//0x89 0x95 0xA3 0xB3 0xC5 0xD3 0xE3
/*
public static int hash(final int x, final int y, final int z, final int seed) {
return (z + 0xD3 * (seed + y)
^ seed + 0xB5 * (x + z )
^ x + 0xC1 * (y + seed)
^ y + 0xE3 * (z + x )) & 255;
}
*/
public static int hash(final int x, final int y, final int z, final int seed) {
int a = 0x632BE5AB;
return (0x9E3779B9
+ (a ^= 0x85157AF5 * seed + x)
+ (a ^= 0x85157AF5 * x + y)
+ (a ^= 0x85157AF5 * y + z)
+ (a ^= 0x85157AF5 * z + seed)) * a >>> 24;
}
/**
* Possibly useful outside SeededNoise. A customized 5-input hash that mixes around all inputs fairly well, and
* produces 8 bits.
* @param x an int to incorporate into the hash
* @param y an int to incorporate into the hash
* @param z an int to incorporate into the hash
* @param w an int to incorporate into the hash
* @param seed an int to incorporate into the hash
* @return a pseudo-random-like int between 0 and 255, inclusive on both
*/
//0x89 0x95 0xA3 0xB3 0xC5 0xD3 0xE3
public static int hashAlt(final int x, final int y, final int z, final int w, final int seed) {
return (
z + 0xD3 * (seed + y)
^ w + 0xB5 * (x + z )
^ seed + 0xC1 * (y + w )
^ x + 0x95 * (z + seed)
^ y + 0xA3 * (w + x )) & 255;
}
/**
* Possibly useful outside SeededNoise. An unrolled version of CrossHash.Wisp that only generates 8 bits.
* @param x an int to incorporate into the hash
* @param y an int to incorporate into the hash
* @param z an int to incorporate into the hash
* @param w an int to incorporate into the hash
* @param seed an int to incorporate into the hash
* @return a pseudo-random-like int between 0 and 255, inclusive on both
*/
public static int hash(final int x, final int y, final int z, final int w, final int seed) {
int a = 0x632BE5AB;
return (0x9E3779B9
+ (a ^= 0x85157AF5 * seed + x)
+ (a ^= 0x85157AF5 * x + y)
+ (a ^= 0x85157AF5 * y + z)
+ (a ^= 0x85157AF5 * z + w)
+ (a ^= 0x85157AF5 * w + seed)) * a >>> 24;
}
/**
* Possibly useful outside SeededNoise. A customized 5-input hash that mixes around all inputs fairly well, and
* produces 8 bits.
* @param x an int to incorporate into the hash
* @param y an int to incorporate into the hash
* @param z an int to incorporate into the hash
* @param w an int to incorporate into the hash
* @param u an int to incorporate into the hash
* @param v an int to incorporate into the hash
* @param seed an int to incorporate into the hash
* @return a pseudo-random-like int between 0 and 255, inclusive on both
*/
//0x89 0x95 0xA3 0xB3 0xC5 0xD3 0xE3
public static int hashAlt(final int x, final int y, final int z, final int w, final int u, final int v, final int seed) {
return (
z + 0x89 * (seed + x)
^ w + 0xC1 * (x + y)
^ u + 0x95 * (y + z)
^ v + 0xD3 * (z + w)
^ seed + 0xA3 * (w + u)
^ x + 0xE3 * (u + v)
^ y + 0xB5 * (v + seed)) & 255;
}
/**
* Possibly useful outside SeededNoise. An unrolled version of CrossHash.Wisp that only generates 8 bits.
* @param x an int to incorporate into the hash
* @param y an int to incorporate into the hash
* @param z an int to incorporate into the hash
* @param w an int to incorporate into the hash
* @param u an int to incorporate into the hash
* @param v an int to incorporate into the hash
* @param seed an int to incorporate into the hash
* @return a pseudo-random-like int between 0 and 255, inclusive on both
*/
public static int hash(final int x, final int y, final int z, final int w, final int u, final int v, final int seed) {
int a = 0x632BE5AB;
return (0x9E3779B9
+ (a ^= 0x85157AF5 * seed + x)
+ (a ^= 0x85157AF5 * x + y)
+ (a ^= 0x85157AF5 * y + z)
+ (a ^= 0x85157AF5 * z + w)
+ (a ^= 0x85157AF5 * w + u)
+ (a ^= 0x85157AF5 * u + v)
+ (a ^= 0x85157AF5 * v + seed)) * a >>> 24;
}
/*
private static int hash(final int x, final int y, final int z, final int w, final int u, final int v, final int seed) {
final int result = 191 * x + 151 * y + 181 * w + 139 * z + 179 * u + 149 * v + 167 * seed;
return 0xFF & (result ^ (result >>> 7));
}
*/
// /**
// * Possibly useful outside SeededNoise. A fast, low-to-mid-quality hash that generates 8 bits.
// * @param x an int to incorporate into the hash
// * @param y an int to incorporate into the hash
// * @param seed an int to incorporate into the hash
// * @return a pseudo-random-like int between 0 and 255, inclusive on both
// */
// public static int hash(final int x, final int y, int seed) {
// return ((seed = x * 0x5a34f ^ y * 0xc29cb ^ seed * 0x63413) ^ ((seed >>> 31 - (seed & 30)) | seed << 1 + (seed & 30))) & 255;
// }
//
// /**
// * Possibly useful outside SeededNoise. A fast, low-to-mid-quality hash that generates 8 bits.
// * @param x an int to incorporate into the hash
// * @param y an int to incorporate into the hash
// * @param z an int to incorporate into the hash
// * @param seed an int to incorporate into the hash
// * @return a pseudo-random-like int between 0 and 255, inclusive on both
// */
// public static int hash(final int x, final int y, final int z, int seed) {
// return ((seed = x * 0x5a34f ^ y * 0xc29cb ^ z ^ 0x13333 ^ seed * 0x63413)
// ^ ((seed >>> 31 - (seed & 30)) | seed << 1 + (seed & 30))) & 255;
// }
// /**
// * Possibly useful outside SeededNoise. A fast, low-to-mid-quality hash that generates 8 bits.
// * @param x an int to incorporate into the hash
// * @param y an int to incorporate into the hash
// * @param z an int to incorporate into the hash
// * @param w an int to incorporate into the hash
// * @param seed an int to incorporate into the hash
// * @return a pseudo-random-like int between 0 and 255, inclusive on both
// */
// public static int hash(final int x, final int y, final int z, final int w, int seed) {
// return ((seed = x * 0x5a34f ^ y * 0xc29cb ^ z ^ 0x13333 ^ w * 0x42023 ^ seed * 0x63413)
// ^ ((seed >>> 31 - (seed & 30)) | seed << 1 + (seed & 30))) & 255;
// }
// /**
// * Possibly useful outside SeededNoise. A fast, low-to-mid-quality hash that generates 8 bits.
// * @param x an int to incorporate into the hash
// * @param y an int to incorporate into the hash
// * @param z an int to incorporate into the hash
// * @param w an int to incorporate into the hash
// * @param u an int to incorporate into the hash
// * @param v an int to incorporate into the hash
// * @param seed an int to incorporate into the hash
// * @return a pseudo-random-like int between 0 and 255, inclusive on both
// */
// public static int hash(final int x, final int y, final int z, final int w, final int u, final int v, int seed) {
// return ((seed = x * 0x5a34f ^ y * 0xc29cb ^ z ^ 0x13333 ^ w * 0x42023 ^ u * 0xb34eb ^ v * 0x2feb7 ^ seed * 0x63413)
// ^ ((seed >>> 31 - (seed & 30)) | seed << 1 + (seed & 30))) & 255;
// }
/**
* Like {@link Math#floor}, but returns an int. Doesn't consider weird floats like INFINITY and NaN.
* @param t the float to find the floor for
* @return the floor of t, as an int
*/
public static int fastFloor(float t) {
return t >= 0 ? (int) t : (int) t - 1;
}
protected static final float F2 = 0.36602540378443864676372317075294f,
G2 = 0.21132486540518711774542560974902f,
F3 = 1f / 3f,
G3 = 1f / 6f,
F4 = (float) (Math.sqrt(5.0) - 1.0) / 4f,
G4 = (float)(5.0 - Math.sqrt(5.0)) / 20f,
F6 = (float)(Math.sqrt(7.0) - 1.0) / 6f,
G6 = F6 / (float)(1.0 + 6.0 * F6),
LIMIT4 = 0.62f,
//LIMIT6 = 0.777f
LIMIT6 = 0.86f
/*
sideLength = (float)Math.sqrt(6.0) / (6f * F6 + 1f),
a6 = (float)(Math.sqrt((sideLength * sideLength)
- ((sideLength * 0.5) * (sideLength * 0.5f)))),
cornerFace = (float)Math.sqrt(a6 * a6 + (a6 * 0.5) * (a6 * 0.5)),
cornerFaceSq = cornerFace * cornerFace,
valueScaler = 9.5f
*/
;
//Math.pow(5.0, -0.5) * (Math.pow(5.0, -3.5) * 100 + 13),
private static final float[] m = {0, 0, 0, 0, 0, 0}, cellDist = {0, 0, 0, 0, 0, 0};
/*private static final int[]
distOrder = new int[]{-1, 0, 0, 0, 0, 0, 0},
intLoc = {0, 0, 0, 0, 0, 0};*/
private static final int[] distOrder = {0, 0, 0, 0, 0, 0},
newDistOrder = new int[]{-1, 0, 0, 0, 0, 0, 0},
intLoc = {0, 0, 0, 0, 0, 0};
public static double noise(final double x, final double y, final int seed) {
return noise((float)x, (float)y, seed);
}
public static double noise(final float x, final float y, final int seed) {
final float s = (x + y) * F2;
final float[] gradient2DLUT = SeededNoise.gradient2DLUT;
final int i = fastFloor(x + s),
j = fastFloor(y + s);
final float t = (i + j) * G2,
X0 = i - t,
Y0 = j - t,
x0 = x - X0,
y0 = y - Y0;
int i1, j1;
if (x0 > y0) {
i1 = 1;
j1 = 0;
} else {
i1 = 0;
j1 = 1;
}
final float
x1 = x0 - i1 + G2,
y1 = y0 - j1 + G2,
x2 = x0 - 1f + 2f * G2,
y2 = y0 - 1f + 2f * G2;
final int h0 = hash(i, j, seed) << 1,
h1 = hash(i + i1, j + j1, seed) << 1,
h2 = hash(i + 1, j + 1, seed) << 1;
float n0, n1, n2;
float t0 = 0.5f - x0 * x0 - y0 * y0;
if (t0 < 0)
n0 = 0;
else {
t0 *= t0;
n0 = t0 * t0 * (x0 * gradient2DLUT[h0] + y0 * gradient2DLUT[h0 | 1]);
}
float t1 = 0.5f - x1 * x1 - y1 * y1;
if (t1 < 0)
n1 = 0;
else {
t1 *= t1;
n1 = t1 * t1 * (x1 * gradient2DLUT[h1] + y1 * gradient2DLUT[h1 | 1]);
}
float t2 = 0.5f - x2 * x2 - y2 * y2;
if (t2 < 0)
n2 = 0;
else {
t2 *= t2;
n2 = t2 * t2 * (x2 * gradient2DLUT[h2] + y2 * gradient2DLUT[h2 | 1]);
}
return (70f * (n0 + n1 + n2)) * 1.42188695 + 0.001054489;
}
public static double noise(final double x, final double y, final double z, final int seed) {
return noise((float)x, (float)y, (float)z, seed);
}
public static double noise(final float x, final float y, final float z, final int seed) {
double n0, n1, n2, n3;
final float[] gradient3DLUT = SeededNoise.gradient3DLUT;
final float s = (x + y + z) * F3;
final int i = fastFloor(x + s),
j = fastFloor(y + s),
k = fastFloor(z + s);
final float t = (i + j + k) * G3;
final float X0 = i - t, Y0 = j - t, Z0 = k - t,
x0 = x - X0, y0 = y - Y0, z0 = z - Z0;
int i1, j1, k1;
int i2, j2, k2;
if (x0 >= y0) {
if (y0 >= z0) {
i1 = 1;
j1 = 0;
k1 = 0;
i2 = 1;
j2 = 1;
k2 = 0;
} else if (x0 >= z0) {
i1 = 1;
j1 = 0;
k1 = 0;
i2 = 1;
j2 = 0;
k2 = 1;
} else {
i1 = 0;
j1 = 0;
k1 = 1;
i2 = 1;
j2 = 0;
k2 = 1;
}
} else {
if (y0 < z0) {
i1 = 0;
j1 = 0;
k1 = 1;
i2 = 0;
j2 = 1;
k2 = 1;
} else if (x0 < z0) {
i1 = 0;
j1 = 1;
k1 = 0;
i2 = 0;
j2 = 1;
k2 = 1;
} else {
i1 = 0;
j1 = 1;
k1 = 0;
i2 = 1;
j2 = 1;
k2 = 0;
}
}
float x1 = x0 - i1 + G3,
y1 = y0 - j1 + G3,
z1 = z0 - k1 + G3,
x2 = x0 - i2 + 2f * G3,
y2 = y0 - j2 + 2f * G3,
z2 = z0 - k2 + 2f * G3,
x3 = x0 - 1f + 3f * G3,
y3 = y0 - 1f + 3f * G3,
z3 = z0 - 1f + 3f * G3;
final int h0 = hash(i, j, k, seed) * 3,
h1 = hash(i + i1, j + j1, k + k1, seed) * 3,
h2 = hash(i + i2, j + j2, k + k2, seed) * 3,
h3 = hash(i + 1, j + 1, k + 1, seed) * 3;
float t0 = 0.6f - x0 * x0 - y0 * y0 - z0 * z0;
if (t0 < 0.0)
n0 = 0.0;
else {
t0 *= t0;
n0 = t0 * t0 * (x0 * gradient3DLUT[h0] + y0 * gradient3DLUT[h0 + 1] + z0 * gradient3DLUT[h0 + 2]);
}
float t1 = 0.6f - x1 * x1 - y1 * y1 - z1 * z1;
if (t1 < 0.0)
n1 = 0.0;
else {
t1 *= t1;
n1 = t1 * t1 * (x1 * gradient3DLUT[h1] + y1 * gradient3DLUT[h1 + 1] + z1 * gradient3DLUT[h1 + 2]);
}
float t2 = 0.6f - x2 * x2 - y2 * y2 - z2 * z2;
if (t2 < 0)
n2 = 0.0;
else {
t2 *= t2;
n2 = t2 * t2 * (x2 * gradient3DLUT[h2] + y2 * gradient3DLUT[h2 + 1] + z2 * gradient3DLUT[h2 + 2]);
}
float t3 = 0.6f - x3 * x3 - y3 * y3 - z3 * z3;
if (t3 < 0)
n3 = 0.0;
else {
t3 *= t3;
n3 = t3 * t3 * (x3 * gradient3DLUT[h3] + y3 * gradient3DLUT[h3 + 1] + z3 * gradient3DLUT[h3 + 2]);
}
return (32f * (n0 + n1 + n2 + n3)) * 1.25086885 + 0.0003194984;
}
public static double noise(final double x, final double y, final double z, final double w, final int seed) {
return noise((float)x, (float)y, (float)z, (float)w, seed);
}
public static double noise(final float x, final float y, final float z, final float w, final int seed) {
float n = 0.0f;
final float s = (x + y + z + w) * F4;
final int i = fastFloor(x + s), j = fastFloor(y + s), k = fastFloor(z + s), l = fastFloor(w + s);
final float[] gradient4DLUT = SeededNoise.gradient4DLUT;
final float t = (i + j + k + l) * G4,
X0 = i - t,
Y0 = j - t,
Z0 = k - t,
W0 = l - t,
x0 = x - X0,
y0 = y - Y0,
z0 = z - Z0,
w0 = w - W0;
final int c = (x0 > y0 ? 128 : 0) | (x0 > z0 ? 64 : 0) | (y0 > z0 ? 32 : 0) | (x0 > w0 ? 16 : 0) | (y0 > w0 ? 8 : 0) | (z0 > w0 ? 4 : 0);
final int i1 = SIMPLEX[c] >>> 2,
j1 = SIMPLEX[c | 1] >>> 2,
k1 = SIMPLEX[c | 2] >>> 2,
l1 = SIMPLEX[c | 3] >>> 2,
i2 = SIMPLEX[c] >>> 1 & 1,
j2 = SIMPLEX[c | 1] >>> 1 & 1,
k2 = SIMPLEX[c | 2] >>> 1 & 1,
l2 = SIMPLEX[c | 3] >>> 1 & 1,
i3 = SIMPLEX[c] & 1,
j3 = SIMPLEX[c | 1] & 1,
k3 = SIMPLEX[c | 2] & 1,
l3 = SIMPLEX[c | 3] & 1;
final float x1 = x0 - i1 + G4,
y1 = y0 - j1 + G4,
z1 = z0 - k1 + G4,
w1 = w0 - l1 + G4,
x2 = x0 - i2 + 2f * G4,
y2 = y0 - j2 + 2f * G4,
z2 = z0 - k2 + 2f * G4,
w2 = w0 - l2 + 2f * G4,
x3 = x0 - i3 + 3f * G4,
y3 = y0 - j3 + 3f * G4,
z3 = z0 - k3 + 3f * G4,
w3 = w0 - l3 + 3f * G4,
x4 = x0 - 1f + 4f * G4,
y4 = y0 - 1f + 4f * G4,
z4 = z0 - 1f + 4f * G4,
w4 = w0 - 1f + 4f * G4;
final int h0 = hash(i, j, k, l, seed) << 2,
h1 = hash(i + i1, j + j1, k + k1, l + l1, seed) << 2,
h2 = hash(i + i2, j + j2, k + k2, l + l2, seed) << 2,
h3 = hash(i + i3, j + j3, k + k3, l + l3, seed) << 2,
h4 = hash(i + 1, j + 1, k + 1, l + 1, seed) << 2;
float t0 = LIMIT4 - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0;
if(t0 > 0) {
t0 *= t0;
n += t0 * t0 * (x0 * gradient4DLUT[h0] + y0 * gradient4DLUT[h0 | 1] + z0 * gradient4DLUT[h0 | 2] + w0 * gradient4DLUT[h0 | 3]);
}
float t1 = LIMIT4 - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1;
if (t1 > 0) {
t1 *= t1;
n += t1 * t1 * (x1 * gradient4DLUT[h1] + y1 * gradient4DLUT[h1 | 1] + z1 * gradient4DLUT[h1 | 2] + w1 * gradient4DLUT[h1 | 3]);
}
float t2 = LIMIT4 - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2;
if (t2 > 0) {
t2 *= t2;
n += t2 * t2 * (x2 * gradient4DLUT[h2] + y2 * gradient4DLUT[h2 | 1] + z2 * gradient4DLUT[h2 | 2] + w2 * gradient4DLUT[h2 | 3]);
}
float t3 = LIMIT4 - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3;
if (t3 > 0) {
t3 *= t3;
n += t3 * t3 * (x3 * gradient4DLUT[h3] + y3 * gradient4DLUT[h3 | 1] + z3 * gradient4DLUT[h3 | 2] + w3 * gradient4DLUT[h3 | 3]);
}
float t4 = LIMIT4 - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4;
if (t4 > 0) {
t4 *= t4;
n += t4 * t4 * (x4 * gradient4DLUT[h4] + y4 * gradient4DLUT[h4 | 1] + z4 * gradient4DLUT[h4 | 2] + w4 * gradient4DLUT[h4 | 3]);
}
return NumberTools.bounce(5.0 + 41.0 * n);
}
public static double noise(final double x, final double y, final double z,
final double w, final double u, final double v, final int seed) {
return noise((float)x, (float)y, (float)z, (float)w, (float)u, (float)v, seed);
}
public static double noise(final float x, final float y, final float z, final float w, final float u, final float v, final int seed) {
final float s = (x + y + z + w + u + v) * F6;
final int skewX = fastFloor(x + s), skewY = fastFloor(y + s), skewZ = fastFloor(z + s),
skewW = fastFloor(w + s), skewU = fastFloor(u + s), skewV = fastFloor(v + s);
final int[] intLoc = SeededNoise.intLoc, distOrder = SeededNoise.distOrder;
intLoc[0] = skewX;
intLoc[1] = skewY;
intLoc[2] = skewZ;
intLoc[3] = skewW;
intLoc[4] = skewU;
intLoc[5] = skewV;
final float unskew = (skewX + skewY + skewZ + skewW + skewU + skewV) * G6;
final float[] cellDist = SeededNoise.cellDist, gradient6DLUT = SeededNoise.gradient6DLUT;
cellDist[0] = x - skewX + unskew;
cellDist[1] = y - skewY + unskew;
cellDist[2] = z - skewZ + unskew;
cellDist[3] = w - skewW + unskew;
cellDist[4] = u - skewU + unskew;
cellDist[5] = v - skewV + unskew;
int o0 = (cellDist[0]<cellDist[1]?1:0)+(cellDist[0]<cellDist[2]?1:0)+(cellDist[0]<cellDist[3]?1:0)+(cellDist[0]<cellDist[4]?1:0)+(cellDist[0]<cellDist[5]?1:0);
int o1 = (cellDist[1]<=cellDist[0]?1:0)+(cellDist[1]<cellDist[2]?1:0)+(cellDist[1]<cellDist[3]?1:0)+(cellDist[1]<cellDist[4]?1:0)+(cellDist[1]<cellDist[5]?1:0);
int o2 = (cellDist[2]<=cellDist[0]?1:0)+(cellDist[2]<=cellDist[1]?1:0)+(cellDist[2]<cellDist[3]?1:0)+(cellDist[2]<cellDist[4]?1:0)+(cellDist[2]<cellDist[5]?1:0);
int o3 = (cellDist[3]<=cellDist[0]?1:0)+(cellDist[3]<=cellDist[1]?1:0)+(cellDist[3]<=cellDist[2]?1:0)+(cellDist[3]<cellDist[4]?1:0)+(cellDist[3]<cellDist[5]?1:0);
int o4 = (cellDist[4]<=cellDist[0]?1:0)+(cellDist[4]<=cellDist[1]?1:0)+(cellDist[4]<=cellDist[2]?1:0)+(cellDist[4]<=cellDist[3]?1:0)+(cellDist[4]<cellDist[5]?1:0);
int o5 = 15-(o0+o1+o2+o3+o4);
distOrder[o0]=0;
distOrder[o1]=1;
distOrder[o2]=2;
distOrder[o3]=3;
distOrder[o4]=4;
distOrder[o5]=5;
float n = 0f;
float skewOffset = 0f;
for (int c = -1; c < 6; c++) {
if (c != -1) intLoc[distOrder[c]]++;
m[0] = cellDist[0] - (intLoc[0] - skewX) + skewOffset;
m[1] = cellDist[1] - (intLoc[1] - skewY) + skewOffset;
m[2] = cellDist[2] - (intLoc[2] - skewZ) + skewOffset;
m[3] = cellDist[3] - (intLoc[3] - skewW) + skewOffset;
m[4] = cellDist[4] - (intLoc[4] - skewU) + skewOffset;
m[5] = cellDist[5] - (intLoc[5] - skewV) + skewOffset;
float tc = LIMIT6;
for (int d = 0; d < 6; d++) {
tc -= m[d] * m[d];
}
if (tc > 0f) {
final int h = hash(intLoc[0], intLoc[1], intLoc[2], intLoc[3],
intLoc[4], intLoc[5], seed) * 6;
float gr = 0f;
for (int d = 0; d < 6; d++) {
gr += gradient6DLUT[h + d] * m[d];
}
n += gr * tc * tc * tc * tc;
}
skewOffset += G6;
}
//return NumberTools.bounce(5.0 + 13.5 * n);
return NumberTools.bounce(10.0 + 16.25 * n);
}
}