quantity

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Div

func Div(x resource.Quantity, y resource.Quantity, scale inf.Scale, rounder inf.Rounder) resource.Quantity

Returns x/y rounded to the specified scale. Note that inf.Scale is inverted. -2 means 100, 2 means 0.01.

func DivFloat64

func DivFloat64(x resource.Quantity, y float64, scale inf.Scale, rounder inf.Rounder) (resource.Quantity, error)

func MulFloat64

func MulFloat64(x resource.Quantity, y float64) (resource.Quantity, error)

func RoundBinarySI added in v0.1.4

func RoundBinarySI(q resource.Quantity, rounder inf.Rounder) resource.Quantity

Rounds input q to the nearest BinarySI representation Mi/Ki.

Types

This section is empty.

Jump to

Keyboard shortcuts

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