maths

package
v0.0.0-...-e03219f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 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 RealNumber](num T) T

func Gcd

func Gcd(nums ...int) int

func Lcm

func Lcm(nums ...int) int

func Max

func Max[T RealNumber](nums ...T) T

func Min

func Min[T RealNumber](nums ...T) T

func Mod

func Mod(d, m int) int

func Sum

func Sum[T RealNumber](nums ...T) T

Types

type Range

type Range struct {
	Left, Right int
}

func (Range) Contains

func (r Range) Contains(s Range) bool

func (Range) ContainsValue

func (r Range) ContainsValue(n int) bool

func (Range) Diff

func (r Range) Diff(remove Range) []Range

func (Range) Intersect

func (r Range) Intersect(s Range) Range

func (Range) Intersects

func (r Range) Intersects(s Range) bool

func (Range) Valid

func (r Range) Valid() bool

type RealNumber

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

Jump to

Keyboard shortcuts

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