mathy

package
v0.0.0-...-07b6cb4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt

func AbsInt(in int) int

func GeneratePrimes

func GeneratePrimes(primes []int, n int) int

GeneratePrimes returns the n-th prime number its param primes []int is intended to contain previously found prime numbers to reduce duplicated work, but still be testable

func GreatestCommonMultiple

func GreatestCommonMultiple(i, j int) int

func LeastCommonMultiple

func LeastCommonMultiple(i, j int) int

func ManhattanDistance

func ManhattanDistance(x1, y1, x2, y2 int) int

func MaxInt

func MaxInt(nums ...int) int

func MinInt

func MinInt(nums ...int) int

func MultiplyIntSlice

func MultiplyIntSlice(nums []int) int

func PythagoreanDistance

func PythagoreanDistance(x1, y1, x2, y2 int) float64

func SumIntSlice

func SumIntSlice(nums []int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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