units

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None  = Unit("")
	Bytes = Unit("B")
	Bits  = Unit("b")
)
View Source
const (
	Yocto = Prefix((-24 + 3*iota))
	Zepto
	Atto
	Fempto
	Pico
	Nano
	Micro
	Milli

	Kilo
	Mega
	Giga
	Tera
	Peta
	Exa
	Zetta
	Yotta
)

Variables

This section is empty.

Functions

func FmtFloat64

func FmtFloat64(x float64, u Unit) string

func SIPrefix

func SIPrefix(x float64) (float64, string)

Types

type Prefix

type Prefix int

func (Prefix) Float64

func (p Prefix) Float64() float64

func (Prefix) String

func (p Prefix) String() string

type Unit

type Unit string

Jump to

Keyboard shortcuts

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