mathp

package module
v1.0.0 Latest Latest
Warning

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

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

README

math

Plus to the standard math package.

Godoc

// Min finds the mininum value within Len number of elements and returns the
// index of it, given a less function.
func Min(Len int, Less func(i, j int) bool) int
// MaxI returns the larger of x or y.
func MaxI(x, y int) int {...}

LICENSE

BSD license

Documentation

Overview

Package mathp is a plus to the standard "math" package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max

func Max(Len int, Less func(i, j int) bool) int

Max finds the maximum value within Len number of elements and returns the index of it, given a less function. Less is similar to sort.Interface.Less. If Len is zero, 0 is returned.

func MaxI

func MaxI(x, y int) int

MaxI returns the larger of x or y.

func MaxI32

func MaxI32(x, y int32) int32

MaxI32 returns the larger of x or y.

func MaxI64

func MaxI64(x, y int64) int64

MaxI64 returns the larger of x or y.

func Min

func Min(Len int, Less func(i, j int) bool) int

Min finds the mininum value within Len number of elements and returns the index of it, given a less function. Less is similar to sort.Interface.Less. If Len is zero, 0 is returned.

func MinI

func MinI(x, y int) int

MinI returns the smaller of x or y.

func MinI32

func MinI32(x, y int32) int32

MinI32 returns the smaller of x or y.

func MinI64

func MinI64(x, y int64) int64

MinI64 returns the smaller of x or y.

Types

This section is empty.

Jump to

Keyboard shortcuts

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