I found that when you put negative numbers into the noise function like xoff or yoff the noise function converts them to positive numbers. Why?? And how do I solve this to be able to put negative numbers into the noise function. Any help is appreciated.
Code is below ↓↓↓
float NoiseJump = 0.01;
int XPosition = -10;
int YPosition = -10;
int LengthToRun = 32;
int PositionInSave = 1;
String[] Save = new String[LengthToRun * LengthToRun + 1];
int NoiseScaleUpValue = 255;
float xoff = NoiseJump * (XPosition * LengthToRun);
Save[0] = str(round(random(MAX_INT)));
saveStrings("Numbers.txt", Save);
for (int Row = 0; Row < LengthToRun; Row++) {
xoff += NoiseJump;
float yoff = NoiseJump * (YPosition * LengthToRun);
for (int Colmn = 0; Colmn < LengthToRun; Colmn++) {
yoff += NoiseJump;
noiseDetail(12, 0.5);
noiseSeed(33);
float OceanNoiseGen = noise(xoff, yoff) * NoiseScaleUpValue;
Save[PositionInSave] = "Row: " + Row + ", Colmn: " + Colmn + ", Value: " + OceanNoiseGen;
PositionInSave++;
}
}
saveStrings("Numbers.txt", Save);
background(0, 255, 0);