Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/pkg/math

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/pkg/math

  • v0.0.0-20141027224758-f2ed9e40e245
  • Source
  • Go
  • Socket score

Version published
Created
Source

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

func EqualBigInt(a, b *big.Int) bool

EqualBigInt returns true if both *big.Ints are equal

func EqualBigRat

func EqualBigRat(a, b *big.Rat) bool

EqualBigRat returns true if both *big.Rats are equal

func Max

func Max(a, b int) int

Max returns the larger of two ints.

func MaxBigInt

func MaxBigInt(a, b *big.Int) *big.Int

MaxBigInt returns the larger of the two *big.Ints

func MaxBigRat

func MaxBigRat(a, b *big.Rat) *big.Rat

MaxBigRat returns the larger of the two *big.Rats

func MaxInt

func MaxInt(a, b int) int

MaxInt returns the larger of two ints.

func MaxInt16

func MaxInt16(a, b int16) int16

MaxInt16 returns the larger of two int16s.

func MaxInt16N

func MaxInt16N(v ...int16) int16

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

func MaxInt32

func MaxInt32(a, b int32) int32

MaxInt32 returns the larger of two int32s.

func MaxInt32N

func MaxInt32N(v ...int32) int32

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

func MaxInt64

func MaxInt64(a, b int64) int64

MaxInt64 returns the larger of two int64s.

func MaxInt64N

func MaxInt64N(v ...int64) int64

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

func MaxInt8

func MaxInt8(a, b int8) int8

MaxInt8 returns the larger of two int8s.

func MaxInt8N

func MaxInt8N(v ...int8) int8

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

func MaxIntN

func MaxIntN(v ...int) int

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

func MaxN

func MaxN(v ...int) int

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

func MaxUint

func MaxUint(a, b uint) uint

MaxUint returns the larger of two uints.

func MaxUint16

func MaxUint16(a, b uint16) uint16

MaxUint16 returns the larger of two uint16s.

func MaxUint16N

func MaxUint16N(v ...uint16) uint16

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

func MaxUint32

func MaxUint32(a, b uint32) uint32

MaxUint32 returns the larger of two uint32s.

func MaxUint32N

func MaxUint32N(v ...uint32) uint32

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

func MaxUint64

func MaxUint64(a, b uint64) uint64

MaxUint64 returns the larger of two uint64s.

func MaxUint64N

func MaxUint64N(v ...uint64) uint64

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

func MaxUint8

func MaxUint8(a, b uint8) uint8

MaxUint8 returns the larger of two uint8s.

func MaxUint8N

func MaxUint8N(v ...uint8) uint8

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

func MaxUintN

func MaxUintN(v ...uint) uint

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

func Min

func Min(a, b int) int

Min returns the smaller of two ints.

func MinBigInt

func MinBigInt(a, b *big.Int) *big.Int

MinBigInt returns the smaller of the two *big.Ints

func MinBigRat

func MinBigRat(a, b *big.Rat) *big.Rat

MinBigRat returns the smaller of the two *big.Rats

func MinInt

func MinInt(a, b int) int

MinInt returns the smaller of two ints.

func MinInt16

func MinInt16(a, b int16) int16

MinInt16 returns the smaller of two int16s.

func MinInt16N

func MinInt16N(v ...int16) int16

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

func MinInt32

func MinInt32(a, b int32) int32

MinInt32 returns the smaller of two int32s.

func MinInt32N

func MinInt32N(v ...int32) int32

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

func MinInt64

func MinInt64(a, b int64) int64

MinInt64 returns the smaller of two int64s.

func MinInt64N

func MinInt64N(v ...int64) int64

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

func MinInt8

func MinInt8(a, b int8) int8

MinInt8 returns the smaller of two int8s.

func MinInt8N

func MinInt8N(v ...int8) int8

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

func MinIntN

func MinIntN(v ...int) int

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

func MinN

func MinN(v ...int) int

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

func MinUint

func MinUint(a, b uint) uint

MinUint returns the smaller of two uints.

func MinUint16

func MinUint16(a, b uint16) uint16

MinUint16 returns the smaller of two uint16s.

func MinUint16N

func MinUint16N(v ...uint16) uint16

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

func MinUint32

func MinUint32(a, b uint32) uint32

MinUint32 returns the smaller of two uint32s.

func MinUint32N

func MinUint32N(v ...uint32) uint32

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

func MinUint64

func MinUint64(a, b uint64) uint64

MinUint64 returns the smaller of two uint64s.

func MinUint64N

func MinUint64N(v ...uint64) uint64

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

func MinUint8

func MinUint8(a, b uint8) uint8

MinUint8 returns the smaller of two uint8s.

func MinUint8N

func MinUint8N(v ...uint8) uint8

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

func MinUintN

func MinUintN(v ...uint) uint

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


Generated by godoc2md

FAQs

Package last updated on 27 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc