util

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendNumber added in v0.23.0

func AppendNumber(dst []byte, f float64) []byte

func GCD added in v0.20.0

func GCD(m, n int) int

func LCM added in v0.20.0

func LCM(m, n int) int

func Lerp added in v0.20.0

func Lerp(v0, v1, t float64) float64

https://developer.nvidia.com/blog/lerp-faster-cuda/

func ParseBool added in v0.7.0

func ParseBool(s string) (b, ok bool)

func ParseFloat added in v0.30.5

func ParseFloat(s string) (f float64, ok bool)

func ParseTimeShift added in v0.30.5

func ParseTimeShift(s string) (years, months, days int, duration time.Duration, ok bool)

func ReflectType added in v0.12.0

func ReflectType(v reflect.Value) reflect.Type

func ValidPageSize added in v0.30.5

func ValidPageSize(s int) bool

Types

type JSON added in v0.12.0

type JSON struct{ Value any }

func (JSON) Scan added in v0.12.0

func (j JSON) Scan(value any) error

type Pointer added in v0.12.0

type Pointer struct{ Value any }

type Set added in v0.18.4

type Set[E comparable] map[E]struct{}

func (Set[E]) Add added in v0.18.4

func (s Set[E]) Add(v E)

func (Set[E]) Contains added in v0.18.4

func (s Set[E]) Contains(v E) bool

Jump to

Keyboard shortcuts

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