currency

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const PenniesInDollar float64 = 100

PenniesInDollar represents that there are 100 pennies in a dollar

Variables

This section is empty.

Functions

func DollarsToPennies

func DollarsToPennies(dollars float64, roundUp bool) uint

DollarsToPennies converts a floating point value in dollars to pennies. If `roundUp` is true any fractional value that is less than 1 penny will be rounded up and added as an additional penny. Otherwise, that value will be discarded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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