# encoding: ascii
# api: powershell
# title: Get-GrowthRate
# description: Calculates percentage growth rate given a starting value, ending value, and number of periods in the range.  stahler thx!
# version: 0.1
# type: function
# author: halr9000
# license: CC0
# function: Get-GrowthRate
# x-poshcode-id: 704
# x-archived: 2009-01-06T13:57:31
#
# Corrected period variable name - djryan
#
function Get-GrowthRate {
	param( $Start, $End, $Period ) 
	$rate = [math]::Abs( [math]::Pow( ( $End / $Start ),( 1 / $Period - 1 ) ) - 1 )
	"{0:P}" -f $rate
}
