Changes

Jump to navigation Jump to search
No change in size ,  01:02, 8 November 2021
m
Text replacement - "''i.e.''," to "''i.e.,''"
Line 145: Line 145:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
The result (''i.e.'', <samp>num</samp>) of <code>random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel))</code> is '''always the minHarvest''', for 2 reasons.
+
The result (''i.e.,'' <samp>num</samp>) of <code>random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel))</code> is '''always the minHarvest''', for 2 reasons.
 
#Taking the <samp>Math.Min</samp> of (<samp>minHarvest + 1</samp>) and (<samp>this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel</samp>) always results in (<samp>minHarvest + 1</samp>)
 
#Taking the <samp>Math.Min</samp> of (<samp>minHarvest + 1</samp>) and (<samp>this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel</samp>) always results in (<samp>minHarvest + 1</samp>)
 
#<samp>random.Next</samp> uses an inclusive lower bound and an exclusive upper bound, so it is effectively calculating a random number between <samp>minHarvest</samp> and <samp>minHarvest</samp>
 
#<samp>random.Next</samp> uses an inclusive lower bound and an exclusive upper bound, so it is effectively calculating a random number between <samp>minHarvest</samp> and <samp>minHarvest</samp>
107,395

edits

Navigation menu