utils

package
v0.0.0-...-f4b2804 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Real](a T) T

Returns the absolute calc from the given val

func GCD

func GCD[T constraints.Integer](n ...T) T

Calculates the Greater Common Divisor of a set of integers panics if there are less than one argument

func LCM

func LCM[T constraints.Integer](n ...T) T

Calculates the Lowest Common Multiple of a set of integers

func MeasureExecutionTime

func MeasureExecutionTime(f func()) func()

Types

type Real

type Real interface {
	constraints.Signed | constraints.Float
}

Jump to

Keyboard shortcuts

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