unitpb

package
v0.0.0-...-8d9afb2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(v float64, from, to traits.Consumable_Unit) (float64, error)

Convert converts from one consumable unit to another, if possible. Units can only be converted if within the same category, LITER -> CUBIC_METER, but not LITER -> METER. Returns an error if conversion is not possible.

func Convert32

func Convert32(v float32, from, to traits.Consumable_Unit) (float32, error)

Convert32 is like Convert with type conversion to float32.

Types

This section is empty.

Jump to

Keyboard shortcuts

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