util

package
v0.0.0-...-fe76f8b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt

func AbsInt(x int) int

func AbsInt32

func AbsInt32(x int32) int32

func Clamp

func Clamp(value, min, max float32) float32

func Distance

func Distance(a, b, c, x, y, z float64) float64

func DistanceInt

func DistanceInt(a, b, c, x, y, z int) float64

func Linear

func Linear(a, b, percent float32) float32

func MaxInt

func MaxInt(a, b int) int

func MinInt

func MinInt(a, b int) int

func NewFunctionCall

func NewFunctionCall(functionName string, values ...*bscript.Value) *bscript.Variable

func NormalizeInt

func NormalizeInt(a int) int

func ToBscriptMap

func ToBscriptMap(d map[string]interface{}) *bscript.Map

Types

type DebugLog

type DebugLog interface {
	Print(msg string)
	Append(msg string)
}

type MutexMap

type MutexMap struct {
	// contains filtered or unexported fields
}

from: https://stackoverflow.com/questions/69393601/how-to-setup-key-based-mutex-lock-and-unlock-in-golang

func NewMutexMap

func NewMutexMap() *MutexMap

func (*MutexMap) Lock

func (l *MutexMap) Lock(key string)

func (*MutexMap) Unlock

func (l *MutexMap) Unlock(key string)

Jump to

Keyboard shortcuts

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