saturating

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Saturatable

type Saturatable interface {
	~uint | ~uint32 | ~uint64
}

type Saturating

type Saturating[T Saturatable] struct {
	// contains filtered or unexported fields
}

func NewSaturating

func NewSaturating[T Saturatable](max T) *Saturating[T]

func (*Saturating[T]) Add

func (s *Saturating[T]) Add(operand T)

func (*Saturating[T]) Value

func (s *Saturating[T]) Value() T

Jump to

Keyboard shortcuts

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