angular modulo for wind dir

This commit is contained in:
minjaesong
2023-09-01 15:51:46 +09:00
parent 96af39ab4a
commit ae078024cb
3 changed files with 154 additions and 41 deletions

View File

@@ -248,7 +248,7 @@ internal object WeatherMixer : RNGConsumer {
val currentWindSpeed = weatherbox.windSpeed.getAndUpdate( world.worldTime.timeDelta / WIND_SPEED_TIME_UNIT) {
currentWeather.getRandomWindSpeed(takeUniformRand(-1f..1f))
}
val currentWindDir = weatherbox.windDir.getAndUpdate( world.worldTime.timeDelta / WIND_DIR_TIME_UNIT) { RNG.nextFloat() } * 2.0 * Math.PI
val currentWindDir = weatherbox.windDir.getAndUpdate( world.worldTime.timeDelta / WIND_DIR_TIME_UNIT) { RNG.nextFloat() * 4f } * Math.PI * 0.5
if (currentWeather.forceWindVec != null) {