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 temperature computations.

Example (One)
{
	fmt.Printf("%g\n", BoilingC-FreezingC)
	boilingF := CToF(BoilingC)
	fmt.Printf("%g\n", boilingF-CToF(FreezingC))
}
Output:

Example (Two)
c := FToC(212.0)
fmt.Println(c.String())
fmt.Printf("%v\n", c)
fmt.Printf("%s\n", c)
fmt.Println(c)
fmt.Printf("%g\n", c)
fmt.Println(float64(c))
Output:

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Celsius

type Celsius float64
const (
	AbsoluteZeroC Celsius = -273.15
	FreezingC     Celsius = 0
	BoilingC      Celsius = 100
)

func FToC

func FToC(f Fahrenheit) Celsius

func (Celsius) String

func (c Celsius) String() string

type Fahrenheit

type Fahrenheit float64

func CToF

func CToF(c Celsius) Fahrenheit

Jump to

Keyboard shortcuts

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