Skip to content

spatialcurrent/go-math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.