Documentation
¶
Overview ¶
Package units implements simple unit conversion functions.
Index ¶
Constants ¶
const ( Inches = 1.0 Feet = 0.0833333333 Meters = 39.37008 )
From units.
const (
Centibars = 1.0
)
From units.
const (
MPH = 1.0
)
From units.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Length ¶
type Length float64
Length is a length stored in Inches.
func (Length) Millimeters ¶
Millimeters returns the length in Millimeters.
type Pressure ¶
type Pressure float64
Pressure is a barometric pressure stored in Inches.
func (Pressure) Hectopascals ¶
Hectopascals returns the pressure in Hectopascals.
type SoilMoisture ¶
type SoilMoisture int
SoilMoisture is moisture in centibars of tension.
func (SoilMoisture) Percent ¶
func (m SoilMoisture) Percent(t SoilType) int
Percent returns the soil moisure as an approximated percentage.
type Temperature ¶
type Temperature float64
Temperature is a temperature stored in Fahrenheit.
func Celsius ¶
func Celsius(c float64) Temperature
Celsius returns a temperature from a value in Celsius.
func Fahrenheit ¶
func Fahrenheit(f float64) Temperature
Fahrenheit returns a temperature from a value in Fahrenheit.
func (Temperature) Celsius ¶
func (t Temperature) Celsius() float64
Celsius returns the temperature in Celsius.
func (Temperature) Fahrenheit ¶
func (t Temperature) Fahrenheit() float64
Fahrenheit returns the temperature in Fahrenheit.