src/Alg/Math/Finance/CompoundInterest.php
public static function calculateInterest( $presentAmount, $futureAmount, $periods )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.5' )
			->setExceptionVersion( '0.9' )
			->message( sprintf(
				'Please use %s (%s) instead',
				'public library "CeusMedia/Math"',
			 	'https://packagist.org/packages/ceus-media/math'
			) );
		if( (int) $periods < 1 )
			throw new InvalidArgumentException( "Periods must be at least 1." );
		$i	= self::root( $futureAmount / $presentAmount, $periods ) - 1;
		$result	=  $i * 100;
		return $result;
	}
public static function calculateInterest( $presentAmount, $futureAmount, $periods )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.5' )
			->setExceptionVersion( '0.9' )
			->message( sprintf(
				'Please use %s (%s) instead',
				'public library "CeusMedia/Math"',
			 	'https://packagist.org/packages/ceus-media/math'
			) );
		if( (int) $periods < 1 )
			throw new InvalidArgumentException( "Periods must be at least 1." );
		$i	= self::root( $futureAmount / $presentAmount, $periods ) - 1;
		$result	=  $i * 100;
		return $result;
	}
public static function calculateInterest ( $ presentAmount , $ futureAmount , $ periods ) { Deprecation :: getInstance ( ) -> setErrorVersion ( '0.8.5' ) -> setExceptionVersion ( '0.9' ) -> message ( sprintf ( 'Please use %s (%s) instead' , 'public library "CeusMedia/Math"' , 'https://packagist.org/packages/ceus-media/math' ) ) ; if ( ( int ) $ periods < 1 ) throw new InvalidArgumentException ( "Periods must be at least 1." ) ; $ i = self :: root ( $ futureAmount / $ presentAmount , $ periods ) - 1 ; $ result = $ i * 100 ; return $ result ; }
Calculates Future Amount from Present Amount statically.
@access		public
@static
@param		float		$amount			Amount to calculate with
@param		float		$interest		Interest per Period
@param		int			$periods		Number of Periods
@return		float
Calculates Future Amount from Present Amount statically .