ordersOfMagnitude

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

golang-ordersOfMagnitude

This package exposes a single function, Name, which describes the order of magnitude of a number.

Go Report Card

Example

package main

import (
	"fmt"

	ordersOfMagnitude "github.com/theTardigrade/golang-ordersOfMagnitude"
)

func main() {
	const exampleNumber = 12_345_678_912

	fmt.Printf(
		"The number %d has an order of magnitude in the %s.\n",
		exampleNumber,
		ordersOfMagnitude.Name(exampleNumber),
	)
}

Running the example code above should produce the following output:

The number 12345678912 has an order of magnitude in the tens of billions.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(number int64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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