intmath

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(x int) int

Abs returns the absolute value of x. It ignores the case Abs(math.Minimum)

func Constrain

func Constrain(x, min, max int) int

Constrain contrains the input x within its boundaries min and max

func Max

func Max(a, b int) int

Max returns the integer maximum from a and b

func Min

func Min(a, b int) int

Min returns the integer minimum from a and b

func Rescale

func Rescale(x, inMin, inMax, outMin, outMax int) int

Rescale maps a value x on a in scale to out scale

Types

This section is empty.

Jump to

Keyboard shortcuts

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