mutils

package
v0.0.0-...-0518d83 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T constraints.Integer | constraints.Float](a T) T

func Clamp

func Clamp[T constraints.Integer | constraints.Float](v, minV, maxV T) T

func FormatWOZeros

func FormatWOZeros[T constraints.Float](val T, precision int) string

FormatWOZeros formats the float with specified precision but removes trailing zeros

func Lerp

func Lerp[T constraints.Integer | constraints.Float, V constraints.Float](min, max T, t V) T

func Sanitize

func Sanitize[T constraints.Float](v, maxV T) T

func SanitizeAngle

func SanitizeAngle[T constraints.Float](v T) T

func SanitizeAngleArc

func SanitizeAngleArc[T constraints.Float](a T) T

func Signum

func Signum[T constraints.Float](a T) T

Types

This section is empty.

Jump to

Keyboard shortcuts

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