math

package
v0.0.0-...-069e140 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateAmountWithFee

func CalculateAmountWithFee(amount, fee float64) float64

CalculateAmountWithFee returns a calculated fee included amount on fee

func CalculateFee

func CalculateFee(amount, fee float64) float64

CalculateFee returns a simple fee on amount

func CalculateNetProfit

func CalculateNetProfit(amount, priceThen, priceNow, costs float64) float64

CalculateNetProfit returns net profit

func CalculatePercentageDifference

func CalculatePercentageDifference(amount, secondAmount float64) float64

CalculatePercentageDifference returns the percentage of difference between multiple time periods

func CalculatePercentageGainOrLoss

func CalculatePercentageGainOrLoss(priceNow, priceThen float64) float64

CalculatePercentageGainOrLoss returns the percentage rise over a certain period

func RoundFloat

func RoundFloat(x float64, prec int) float64

RoundFloat rounds your floating point number to the desired decimal place

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL