umath

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package umath provides some useful unsigned math functions to prevent underflows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subtract

func Subtract(a, b uint64) (uint64, bool)

Subtract returns a - b and true if a >= b, otherwise 0 and false.

func SubtractOrZero

func SubtractOrZero(a, b uint64) uint64

SubtractOrZero returns a - b if a >= b, otherwise 0. This is a convenience function for inline usage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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