mathutil

package
v12.65.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Overview

Package mathutil provides some additional math methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(val int) int

Abs returns absolute value

func Abs16

func Abs16(val int16) int16

Abs16 returns absolute value

func Abs32

func Abs32(val int32) int32

Abs32 returns absolute value

func Abs64

func Abs64(val int64) int64

Abs64 returns absolute value

func Abs8

func Abs8(val int8) int8

Abs8 returns absolute value

func AbsF

func AbsF(val float64) float64

AbsF returns absolute value

func AbsF32

func AbsF32(val float32) float32

AbsF32 returns absolute value

func AbsF64

func AbsF64(val float64) float64

AbsF64 returns absolute value

func Between

func Between(val, min, max int) int

Between returns value between min and max values

func Between16

func Between16(val, min, max int16) int16

Between16 returns value between min and max values

func Between32

func Between32(val, min, max int32) int32

Between32 returns value between min and max values

func Between64

func Between64(val, min, max int64) int64

Between64 returns value between min and max values

func Between8

func Between8(val, min, max int8) int8

Between8 returns value between min and max values

func BetweenF

func BetweenF(val, min, max float64) float64

BetweenF returns value between min and max values

func BetweenF32

func BetweenF32(val, min, max float32) float32

BetweenF32 returns value between min and max values

func BetweenF64

func BetweenF64(val, min, max float64) float64

BetweenF64 returns value between min and max values

func BetweenU

func BetweenU(val, min, max uint) uint

BetweenU returns value between min and max values

func BetweenU16

func BetweenU16(val, min, max uint16) uint16

BetweenU16 returns value between min and max values

func BetweenU32

func BetweenU32(val, min, max uint32) uint32

BetweenU32 returns value between min and max values

func BetweenU64

func BetweenU64(val, min, max uint64) uint64

BetweenU64 returns value between min and max values

func BetweenU8

func BetweenU8(val, min, max uint8) uint8

BetweenU8 returns value between min and max values

func Max

func Max(val1, val2 int) int

Max returns a greater value

func Max16

func Max16(val1, val2 int16) int16

Max16 returns a greater value

func Max32

func Max32(val1, val2 int32) int32

Max32 returns a greater value

func Max64

func Max64(val1, val2 int64) int64

Max64 returns a greater value

func Max8

func Max8(val1, val2 int8) int8

Max8 returns a greater value

func MaxU

func MaxU(val1, val2 uint) uint

MaxU returns a greater value

func MaxU16

func MaxU16(val1, val2 uint16) uint16

MaxU16 returns a greater value

func MaxU32

func MaxU32(val1, val2 uint32) uint32

MaxU32 returns a greater value

func MaxU64

func MaxU64(val1, val2 uint64) uint64

MaxU64 returns a greater value

func MaxU8

func MaxU8(val1, val2 uint8) uint8

MaxU8 returns a greater value

func Min

func Min(val1, val2 int) int

Min returns a smaller value

func Min16

func Min16(val1, val2 int16) int16

Min16 returns a smaller value

func Min32

func Min32(val1, val2 int32) int32

Min32 returns a smaller value

func Min64

func Min64(val1, val2 int64) int64

Min64 returns a smaller value

func Min8

func Min8(val1, val2 int8) int8

Min8 returns a smaller value

func MinU

func MinU(val1, val2 uint) uint

MinU returns a smaller value

func MinU16

func MinU16(val1, val2 uint16) uint16

MinU16 returns a smaller value

func MinU32

func MinU32(val1, val2 uint32) uint32

MinU32 returns a smaller value

func MinU64

func MinU64(val1, val2 uint64) uint64

MinU64 returns a smaller value

func MinU8

func MinU8(val1, val2 uint8) uint8

MinU8 returns a smaller value

func Round

func Round(v float64, p int) float64

Round returns rounded value

Types

This section is empty.

Jump to

Keyboard shortcuts

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