This should be quick, I have identified the issue but don’t know how to fix it, here’s the code:
class Character {
constructor(min, max, name, lastname){
this.name = name;
this.lastname = lastname;
this.x = getRandomArbitrary(min, max);
this.incert = 0.167*Math.E**(0.0109*this.x)
this.AveParam1 = -37.973*Math.log(this.x)+259.73;
this.AveParam1 = this.AveParam1.toFixed(2)
this.AveParam2 = 0.6904*Math.log(this.x)-2.5279;
this.AveParam3 = 12.197*Math.log(this.x)-57.259;
this.AveParam4 = 12.658*Math.log(this.x)-59.645;
this.AveParam5 = 12.428*Math.log(this.x)-40.302;
let y = this.incert * (-1)
this.Param2 = this.AveParam2 + getRandomArbitrary(y, this.incert);
...
It seems like the issue is in the last line, how I define this.Param2 seems to be the issue. I tried removing getRandomArbitrary(y, this.incert) but that doesn’t fix it. Maybe I should be using a keyword I’m not aware of? honestly don’t know what’s wrong, I’m self taught.