LCOV - code coverage report
Current view: top level - globalscripts - Trade.js (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 2 0.0 %
Date: 2023-04-02 12:52:40 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /**
       2             :  * Normalize the trade gain as a function of mapSize for a default of: size=1024 and distance= 100m
       3             :  */
       4             : function TradeGainNormalization(mapSize)
       5             : {
       6           0 :         return Math.sqrt(1024 / mapSize) / TradeGain(10000, mapSize);
       7             : }
       8             : 
       9             : /**
      10             :  * Part of the trade gain which depends on the distance, the full gain being TradeGainNormalization * TradeGain.
      11             :  */
      12             : function TradeGain(distanceSquared, mapSize)
      13             : {
      14           0 :         return distanceSquared / (1 + 0.25 * Math.sqrt(distanceSquared) / mapSize);
      15             : }

Generated by: LCOV version 1.14