price

package
v0.0.0-...-24518c4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotExact error = errors.New("conversion from float to int is not exact")

Functions

func AddDecimals

func AddDecimals(num *big.Float, dec *big.Int) *big.Int

Receives a float and the number of decimals and returns an int with the decimals added

func MultiplyPercent

func MultiplyPercent(num *big.Int, mult float64) *big.Int

Receives an int and multiplies it by the percentage of mult

func RemoveDecimals

func RemoveDecimals(num *big.Int, dec *big.Int) *big.Float

Receives an int and the number of decimals and returns a float without the decimals

Types

This section is empty.

Jump to

Keyboard shortcuts

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