mathx

package
v0.0.0-...-3028776 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs[T Numeric](n T) T

func GCD

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

func LCM

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

func Mod

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

omg why can't all languages just provide this

func Sum

func Sum[T Numeric](seq iter.Seq[T]) T

Types

type Numeric

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

Jump to

Keyboard shortcuts

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