Logo
Explore Help
Register Sign In
obitools/obitools4
2
0
Fork 0
You've already forked obitools4
mirror of https://github.com/metabarcoding/obitools4.git synced 2025-06-29 16:20:46 +00:00
Code Issues Packages Projects Releases Wiki Activity
Files
master
obitools4/pkg/obiutils/abs.go

15 lines
245 B
Go
Raw Permalink Normal View History

debug of obimultiplex Former-commit-id: 1cf276840feb9d6135d96bd1bf63627d3085ae6e
2024-06-18 23:38:33 +02:00
package obiutils
import "golang.org/x/exp/constraints"
Changes to be committed: modified: pkg/obioptions/version.go modified: pkg/obitools/obitagpcr/pcrtag.go modified: pkg/obiutils/abs.go new file: pkg/obiutils/abs_test.go
2024-10-28 21:51:21 +01:00
// Abs returns the absolute value of x.
//
// It is a generic function that can be used on any signed type.
debug of obimultiplex Former-commit-id: 1cf276840feb9d6135d96bd1bf63627d3085ae6e
2024-06-18 23:38:33 +02:00
func Abs[T constraints.Signed](x T) T {
if x < 0 {
return -x
}
Changes to be committed: modified: pkg/obioptions/version.go modified: pkg/obitools/obitagpcr/pcrtag.go modified: pkg/obiutils/abs.go new file: pkg/obiutils/abs_test.go
2024-10-28 21:51:21 +01:00
debug of obimultiplex Former-commit-id: 1cf276840feb9d6135d96bd1bf63627d3085ae6e
2024-06-18 23:38:33 +02:00
return x
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 110ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API