Discover Packages
github.com/bborbe/go-skeleton
pkg
mathutil
package
Version:
v0.4.2
Opens a new window with list of versions in this module.
Published: Jun 2, 2026
License: BSD-2-Clause
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package mathutil provides small, dependency-free numeric helpers.
func Clamp(value, min, max int ) int
Clamp returns value constrained to the inclusive range [min, max].
If min is greater than max the bounds are swapped so the result is
always well defined.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.