tempconv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tempconv performs Celsius and Fahrenheit conversion.

Index

Constants

View Source
const (
	AbsoluteZeroC Celsius = -273.15
	FreezingC     Celsius = 0
	BoilingC      Celsius = 100

	AbsoluteZeroK Kelvin = 0
	FreezingK     Kelvin = 273.15
	BoilingK      Kelvin = 373.15

	AbsoluteZeroF Fahrenheit = -459.66999999999996
	FreezingF     Fahrenheit = 32
	BoilingF      Fahrenheit = 212
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Celsius

type Celsius float64

func FToC

func FToC(f Fahrenheit) Celsius

FToC converts a Fahrenheit temperature to Celsius.

func KToC

func KToC(k Kelvin) Celsius

func (Celsius) String

func (c Celsius) String() string

type Fahrenheit

type Fahrenheit float64

func CToF

func CToF(c Celsius) Fahrenheit

CToF converts a Celsius temperature to Fahrenheit.

func KToF

func KToF(k Kelvin) Fahrenheit

func (Fahrenheit) String

func (f Fahrenheit) String() string

type Kelvin

type Kelvin float64

func CToK

func CToK(c Celsius) Kelvin

CToK converts a Celsius temperature to Kelvin.

func FToK

func FToK(f Fahrenheit) Kelvin

FToK converts a Fahrenheit temperature to Kelvin. func FToK(f Fahrenheit) Kelvin { return CToK(FToC(f)) }

func (Kelvin) String

func (k Kelvin) String() string

Jump to

Keyboard shortcuts

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