utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package utils provides various utilities and helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClampFloat64

func ClampFloat64(value, min, max float64) float64

ClampFloat64 limits the provided value according to the given range. Origin: https://docs.unity3d.com/ScriptReference/Mathf.Clamp.html.

Types

type Counter

type Counter interface {
	go_metrics.Counter
}

Counter - thread-safe metrics counter.

func NewCounter

func NewCounter(parent Counter) Counter

NewCounter creates counter referring to parent counter. If parent is nil, the root in hierarchy is created.

Directories

Path Synopsis
Package breaker contains useful thread-safe abstraction the helps to control lifetime of actors, background tasks, pools etc.
Package breaker contains useful thread-safe abstraction the helps to control lifetime of actors, background tasks, pools etc.
config
bytes
Package bytes helps to represent human-readable size values in JSON.
Package bytes helps to represent human-readable size values in JSON.
duration
Package duration helps to represent human-readable duration values in JSON.
Package duration helps to represent human-readable duration values in JSON.
prepare
Package prepare provides a function to validate configuration recursively.
Package prepare provides a function to validate configuration recursively.

Jump to

Keyboard shortcuts

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