This is my code and the log:
let decayFactor = 0.99
item.value.value = item.value.amount * Math.pow(decayFactor, average / 10)*(0.5+Math.random())
console.log(itemName,item.value.value,item.value.amount,average)```
```[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: silicon
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: NaN
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: 50.0
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: 0.0d [net.minecraft.nbt.DoubleTag]
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: glass
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: NaN
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: 250.0
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: 0.0d [net.minecraft.nbt.DoubleTag]
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: lava_bucket
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: NaN
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: 500.0
[18:37:13] [INFO] mystery_lands_mine_factory.js#2532: 0.0d [net.minecraft.nbt.DoubleTag]```
Taking those values and putting them into an online js envoironment, it works just fine and gives me a valid number(As seen in the screenshot)
why
