Limiting variance to only under 100% fluctuation

So, with variance in skill formulas, the effect applies both ways for a successful usage: You will either hit higher than the base of the formula (over 100%) or lower than the base(under 100%).

What I would like to do is prevent skills from going over 100% in output from variance, and leave that as the max. When I put in a damage formula such as:

700 with a variance of 15% I am looking and structuring it as the maximum output already. I want the 15% variance to only go down from 700 and not over it, so 700 in this example is the 100%. How can I limit the movement of variance in my formulas?
Try:

Code:
class Game_Battler < Game_BattlerBase  #--------------------------------------------------------------------------  # * Applying Variance  #--------------------------------------------------------------------------  def apply_variance(damage, variance)    amp = [damage.abs * variance / 100, 0].max.to_i    var = rand(amp + 1) - amp    damage >= 0 ? damage + var : damage - var  endend
Should I just copy and paste that right under the apply variance in game battler line 358? Where should I put it?
In a new script section. Below Materials and above Main.
Oh great. This does what I need, thank you.

Original thread: https://forums.rpgmakerweb.com/threads/limiting-variance-to-only-under-100-fluctuation.22090/