math

package module
v3.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: BSD-3-Clause Imports: 0 Imported by: 0

README

math

This package contains a few math utilities that are not found in the builtin math package. In particular, things like Min and Max for integral types, etc.

Using this package

The usual:

import "go.timothygu.me/math/v3/imath" // or any package you'd like to use

Developing this package

All of the functional code is generated for different types – at least until Go gains generics. The generator lives in generate/, and could be triggered using:

go generate

To run tests, use the familiar

go test ./...

However, you could also do

make test

which would regenerate source files using go generate if needed.

Finally, to remove all generated files, do

make clean

License

See LICENSE.md.

Documentation

Overview

Package math contains some utilities not found in the built-in math package.

Directories

Path Synopsis
Command generate creates the entire math package.
Command generate creates the entire math package.
Package i16math provides some utilities for the int16 type that mirror those found in the built-in math package.
Package i16math provides some utilities for the int16 type that mirror those found in the built-in math package.
Package i32math provides some utilities for the int32 type that mirror those found in the built-in math package.
Package i32math provides some utilities for the int32 type that mirror those found in the built-in math package.
Package i64math provides some utilities for the int64 type that mirror those found in the built-in math package.
Package i64math provides some utilities for the int64 type that mirror those found in the built-in math package.
Package i8math provides some utilities for the int8 type that mirror those found in the built-in math package.
Package i8math provides some utilities for the int8 type that mirror those found in the built-in math package.
Package imath provides some utilities for the int type that mirror those found in the built-in math package.
Package imath provides some utilities for the int type that mirror those found in the built-in math package.
Package u16math provides some utilities for the uint16 type that mirror those found in the built-in math package.
Package u16math provides some utilities for the uint16 type that mirror those found in the built-in math package.
Package u32math provides some utilities for the uint32 type that mirror those found in the built-in math package.
Package u32math provides some utilities for the uint32 type that mirror those found in the built-in math package.
Package u64math provides some utilities for the uint64 type that mirror those found in the built-in math package.
Package u64math provides some utilities for the uint64 type that mirror those found in the built-in math package.
Package u8math provides some utilities for the uint8 type that mirror those found in the built-in math package.
Package u8math provides some utilities for the uint8 type that mirror those found in the built-in math package.
Package umath provides some utilities for the uint type that mirror those found in the built-in math package.
Package umath provides some utilities for the uint type that mirror those found in the built-in math package.

Jump to

Keyboard shortcuts

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