Documentation ¶
Index ¶
- func CalculateAmountWithFee(amount, fee float64) float64
- func CalculateFee(amount, fee float64) float64
- func CalculateNetProfit(amount, priceThen, priceNow, costs float64) float64
- func CalculatePercentageDifference(amount, secondAmount float64) float64
- func CalculatePercentageGainOrLoss(priceNow, priceThen float64) float64
- func RoundFloat(x float64, prec int) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateAmountWithFee ¶
CalculateAmountWithFee returns a calculated fee included amount on fee
func CalculateFee ¶
CalculateFee returns a simple fee on amount
func CalculateNetProfit ¶
CalculateNetProfit returns net profit
func CalculatePercentageDifference ¶
CalculatePercentageDifference returns the percentage of difference between multiple time periods
func CalculatePercentageGainOrLoss ¶
CalculatePercentageGainOrLoss returns the percentage rise over a certain period
func RoundFloat ¶
RoundFloat rounds your floating point number to the desired decimal place
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.