maths

package
v0.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ceil

func Ceil[T Number](value, max T) T

func Clamp

func Clamp[T Number](value, min, max T) T

func Floor

func Floor[T Number](value, min T) T

func ReverseSortedNumbers

func ReverseSortedNumbers[K Number, V interface{}](data map[K]V) (keys []K)

func SortedNumbers

func SortedNumbers[K Number, V interface{}](data map[K]V) (keys []K)

Types

type Number

type Number interface {
	uint | uint8 | uint16 | uint32 | uint64 |
		int | int8 | int16 | int32 | int64 |
		float32 | float64
}

Jump to

Keyboard shortcuts

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