Skip to content
This repository was archived by the owner on Mar 18, 2021. It is now read-only.

pkg/math

Repository files navigation

math

import "github.com/pkg/math" 

Package math provides helper functions for mathematical operations over all integer Go types.

Almost all files in this package are automatically generated.

To regenerate this package

make -B 

This package relies on github.com/davecheney/godoc2md.

func EqualBigInt

funcEqualBigInt(a, b*big.Int) bool

EqualBigInt returns true if both *big.Ints are equal

func EqualBigRat

funcEqualBigRat(a, b*big.Rat) bool

EqualBigRat returns true if both *big.Rats are equal

func Max

funcMax(a, bint) int

Max returns the larger of two ints.

func MaxBigInt

funcMaxBigInt(a, b*big.Int) *big.Int

MaxBigInt returns the larger of the two *big.Ints

func MaxBigRat

funcMaxBigRat(a, b*big.Rat) *big.Rat

MaxBigRat returns the larger of the two *big.Rats

func MaxInt

funcMaxInt(a, bint) int

MaxInt returns the larger of two ints.

func MaxInt16

funcMaxInt16(a, bint16) int16

MaxInt16 returns the larger of two int16s.

func MaxInt16N

funcMaxInt16N(v...int16) int16

MaxInt16N returns the largest int16 in the set provided. If no values are provided, MaxInt16 returns 0.

func MaxInt32

funcMaxInt32(a, bint32) int32

MaxInt32 returns the larger of two int32s.

func MaxInt32N

funcMaxInt32N(v...int32) int32

MaxInt32N returns the largest int32 in the set provided. If no values are provided, MaxInt32 returns 0.

func MaxInt64

funcMaxInt64(a, bint64) int64

MaxInt64 returns the larger of two int64s.

func MaxInt64N

funcMaxInt64N(v...int64) int64

MaxInt64N returns the largest int64 in the set provided. If no values are provided, MaxInt64 returns 0.

func MaxInt8

funcMaxInt8(a, bint8) int8

MaxInt8 returns the larger of two int8s.

func MaxInt8N

funcMaxInt8N(v...int8) int8

MaxInt8N returns the largest int8 in the set provided. If no values are provided, MaxInt8 returns 0.

func MaxIntN

funcMaxIntN(v...int) int

MaxIntN returns the largest int in the set provided. If no values are provided, MaxInt returns 0.

func MaxN

funcMaxN(v...int) int

MaxN returns the largest int in the set provided. If no values are provided, Max returns 0.

func MaxUint

funcMaxUint(a, buint) uint

MaxUint returns the larger of two uints.

func MaxUint16

funcMaxUint16(a, buint16) uint16

MaxUint16 returns the larger of two uint16s.

func MaxUint16N

funcMaxUint16N(v...uint16) uint16

MaxUint16N returns the largest uint16 in the set provided. If no values are provided, MaxUint16 returns 0.

func MaxUint32

funcMaxUint32(a, buint32) uint32

MaxUint32 returns the larger of two uint32s.

func MaxUint32N

funcMaxUint32N(v...uint32) uint32

MaxUint32N returns the largest uint32 in the set provided. If no values are provided, MaxUint32 returns 0.

func MaxUint64

funcMaxUint64(a, buint64) uint64

MaxUint64 returns the larger of two uint64s.

func MaxUint64N

funcMaxUint64N(v...uint64) uint64

MaxUint64N returns the largest uint64 in the set provided. If no values are provided, MaxUint64 returns 0.

func MaxUint8

funcMaxUint8(a, buint8) uint8

MaxUint8 returns the larger of two uint8s.

func MaxUint8N

funcMaxUint8N(v...uint8) uint8

MaxUint8N returns the largest uint8 in the set provided. If no values are provided, MaxUint8 returns 0.

func MaxUintN

funcMaxUintN(v...uint) uint

MaxUintN returns the largest uint in the set provided. If no values are provided, MaxUint returns 0.

func Min

funcMin(a, bint) int

Min returns the smaller of two ints.

func MinBigInt

funcMinBigInt(a, b*big.Int) *big.Int

MinBigInt returns the smaller of the two *big.Ints

func MinBigRat

funcMinBigRat(a, b*big.Rat) *big.Rat

MinBigRat returns the smaller of the two *big.Rats

func MinInt

funcMinInt(a, bint) int

MinInt returns the smaller of two ints.

func MinInt16

funcMinInt16(a, bint16) int16

MinInt16 returns the smaller of two int16s.

func MinInt16N

funcMinInt16N(v...int16) int16

MinInt16N returns the smallest int16 in the set provided. If no values are provided, MinInt16 returns 0.

func MinInt32

funcMinInt32(a, bint32) int32

MinInt32 returns the smaller of two int32s.

func MinInt32N

funcMinInt32N(v...int32) int32

MinInt32N returns the smallest int32 in the set provided. If no values are provided, MinInt32 returns 0.

func MinInt64

funcMinInt64(a, bint64) int64

MinInt64 returns the smaller of two int64s.

func MinInt64N

funcMinInt64N(v...int64) int64

MinInt64N returns the smallest int64 in the set provided. If no values are provided, MinInt64 returns 0.

func MinInt8

funcMinInt8(a, bint8) int8

MinInt8 returns the smaller of two int8s.

func MinInt8N

funcMinInt8N(v...int8) int8

MinInt8N returns the smallest int8 in the set provided. If no values are provided, MinInt8 returns 0.

func MinIntN

funcMinIntN(v...int) int

MinIntN returns the smallest int in the set provided. If no values are provided, MinInt returns 0.

func MinN

funcMinN(v...int) int

MinN returns the smallest int in the set provided. If no values are provided, Min returns 0.

func MinUint

funcMinUint(a, buint) uint

MinUint returns the smaller of two uints.

func MinUint16

funcMinUint16(a, buint16) uint16

MinUint16 returns the smaller of two uint16s.

func MinUint16N

funcMinUint16N(v...uint16) uint16

MinUint16N returns the smallest uint16 in the set provided. If no values are provided, MinUint16 returns 0.

func MinUint32

funcMinUint32(a, buint32) uint32

MinUint32 returns the smaller of two uint32s.

func MinUint32N

funcMinUint32N(v...uint32) uint32

MinUint32N returns the smallest uint32 in the set provided. If no values are provided, MinUint32 returns 0.

func MinUint64

funcMinUint64(a, buint64) uint64

MinUint64 returns the smaller of two uint64s.

func MinUint64N

funcMinUint64N(v...uint64) uint64

MinUint64N returns the smallest uint64 in the set provided. If no values are provided, MinUint64 returns 0.

func MinUint8

funcMinUint8(a, buint8) uint8

MinUint8 returns the smaller of two uint8s.

func MinUint8N

funcMinUint8N(v...uint8) uint8

MinUint8N returns the smallest uint8 in the set provided. If no values are provided, MinUint8 returns 0.

func MinUintN

funcMinUintN(v...uint) uint

MinUintN returns the smallest uint in the set provided. If no values are provided, MinUint returns 0.


Generated by godoc2md

About

Ancillary Mathematical functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages