Fixed slight mistake in GenLayerClimate clamping
This commit is contained in:
parent
47e5633058
commit
acc3117eda
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ public class GenLayerClimate extends BOPGenLayer {
|
||||||
|
|
||||||
// temperature values from 0 (cold) to 8 (hot) and rainfall values from 0 (wet) to 11 (dry), index is (temperatureValue * 12) + rainfallValue
|
// temperature values from 0 (cold) to 8 (hot) and rainfall values from 0 (wet) to 11 (dry), index is (temperatureValue * 12) + rainfallValue
|
||||||
// index is clamped to account for potential rounding errors due to use of doubles/floats
|
// index is clamped to account for potential rounding errors due to use of doubles/floats
|
||||||
out[i] = this.climateMapping[MathHelper.clamp_int(index, 0, this.climateMapping.length)];
|
out[i] = this.climateMapping[MathHelper.clamp_int(index, 0, this.climateMapping.length - 1)];
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue