math

package
v0.0.0-...-6263c15 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

A simple math package for basic number comparisons

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Number](x T) T

func Clamp

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

func Max

func Max[T Number](a T, b T) T

func Min

func Min[T Number](a T, b T) T

Types

type Float

type Float interface {
	float32 | float64
}

type Integer

type Integer interface {
	uint8 | uint16 | uint32 | uint64 | uint |
		int8 | int16 | int32 | int64 | int
}

type Number

type Number interface {
	Float | Integer
}

Jump to

Keyboard shortcuts

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