code: protected function calculateAttributePrice(VariantInterface $variant, $amount)
      {
          $modifierType  = $variant->getModifierType();
          $modifierValue = $variant->getModifierValue();
          
          switch ($modifierType) {
              case '+':
                  $amount = $amount + $modifierValue;
                  break;
              case '-':
                  $amount = $amount - $modifierValue;
                  break;
              case '%':
                  $amount = $amount * ($modifierValue / 100);
                  break;
          }
          
          return round($amount, 2);
      }
docs: Calculates new amount for attribute
  
  @param VariantInterface          $variant
  @param                           $amount
  
  @return float