math

package
v0.0.0-...-a6b0214 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Number](n T) T

Abs returns the absolute value of n.

func Mod

func Mod[T constraints.Integer](n T, mod T) T

Mod returns the positive modulus of 'n' by 'mod'.

Types

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

Number is a type constraint matching Integers and Floats.

Jump to

Keyboard shortcuts

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