go-math

module
v0.0.0-...-b3872f7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT

README

CircleCI Go Report Card GoDoc license

go-math

Description

go-math is a simple library that provides math functions that support varied types, but makes smart decisions to maximize precision and maintain input types. For example, you can sum a slice of ints and floats.

go-math can be used in scenarios when you do not know the type of the input data a-priori. For example, a sensor might report altitude as an integer or as a float64.

Usage

Go

You can import go-math as a library with:

import (
  "github.com/spatialcurrent/go-math/pkg/math"
)

See math in GoDoc for information on how to use Go API.

Examples

See the many examples in GoDoc or the tests.

Testing

Run test using make test or (bash scripts/test.sh), which runs unit tests, go vet, go vet with shadow, errcheck, ineffassign, staticcheck, and misspell.

Contributing

Spatial Current, Inc. is currently accepting pull requests for this repository. We'd love to have your contributions! Please see Contributing.md for how to get started.

License

This work is distributed under the MIT License. See LICENSE file.

Directories

Path Synopsis
pkg
math
Package math provides math functions that support varied types, but tries to preserve the original type if possible.
Package math provides math functions that support varied types, but tries to preserve the original type if possible.

Jump to

Keyboard shortcuts

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