Market share calculation

This commit is contained in:
Dennis Eichhorn 2017-01-11 23:57:32 +01:00
parent f0174dd56a
commit c507e60e1d

View File

@ -1397,4 +1397,36 @@ class FinanceFormulas
return $P * $r * $t;
}
/**
* Relative market share by share
*
* @param float $ownShare Own market share
* @param float $competitorShare Largest competitor market share
*
* @return float
*
* @since 1.0.0
* @author Dennis Eichhorn
*/
public static function getRelativeMarketShareByShare(float $ownShare, float $competitorShare) : float
{
return $ownShare / $competitorShare;
}
/**
* Relative market share by sales
*
* @param float $ownSales Own sales
* @param float $competitorSales Largest competitor sales
*
* @return float
*
* @since 1.0.0
* @author Dennis Eichhorn
*/
public static function getRelativeMarketShareBySales(float $ownSales, float $competitorSales) : float
{
return $ownSales / $competitorSales;
}
}