primitives

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaturatingAdd

func SaturatingAdd[T constraints.Integer](a, b T) T

SaturatingAdd computes a + b saturating at the numeric bounds instead of overflowing

func SaturatingSub

func SaturatingSub[T constraints.Integer](a, b T) T

SaturatingSub computes a - b saturating at the numeric bounds instead of overflowing

Types

This section is empty.

Jump to

Keyboard shortcuts

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