math

package
v0.0.0-...-62f0fa5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: GPL-3.0 Imports: 2 Imported by: 37

Documentation

Overview

Package math 计算实用工具

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(x int) int

Abs 返回绝对值, 该函数将被内联

func Abs64

func Abs64(x int64) int64

Abs64 返回绝对值, 该函数将被内联

func Ceil

func Ceil[T num](dividend, divisor T) T

Ceil 向上整除(除数,被除数)

func Max

func Max[T num](a, b T) T

Max 返回两数最大值, 该函数将被内联

func Min

func Min[T num](a, b T) T

Min 返回两数最小值, 该函数将被内联

func Partition

func Partition[T any](list []T, size int) (plist [][]T)

Partition 分片函数

func Similarity

func Similarity(x, y []uint8) float64

Similarity len(x) must eq len(y)

func Str2Int64

func Str2Int64(str string) int64

Str2Int64 string to int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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