tempconv

package
v0.0.0-...-f53f79a Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tempconv performs Celsius and Fahrenheit conversions.

Index

Examples

Constants

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

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 (Fahrenheit) String

func (f Fahrenheit) String() string

type Kelvin

type Kelvin float64
Example
fmt.Println(CToK(FreezingC))
Output:

func CToK

func CToK(c Celsius) Kelvin

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