LCOV - code coverage report
Current view: top level - _classes/math - abstract_recalculation.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 3 100.0 %
Date: 2024-10-04 11:08:31 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2023 The terCAD team. All rights reserved.
       2             : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
       3             : 
       4             : import 'package:app_finance/_classes/structure/currency/exchange.dart';
       5             : 
       6             : abstract class AbstractRecalculation {
       7             :   late Exchange exchange;
       8             : 
       9             :   double getDelta();
      10             : 
      11           3 :   double getProgress(double amount, double progress, double delta, [double shift = 0]) {
      12           6 :     if (amount + shift != 0) {
      13          12 :       progress = (amount * progress + delta) / (amount + shift);
      14             :     } else {
      15             :       progress = 0.0;
      16             :     }
      17             :     return progress;
      18             :   }
      19             : }

Generated by: LCOV version 1.14