...

Source file src/golang.org/x/net/internal/quic/math.go

Documentation: golang.org/x/net/internal/quic

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build go1.21
     6  
     7  package quic
     8  
     9  func abs[T ~int | ~int64](a T) T {
    10  	if a < 0 {
    11  		return -a
    12  	}
    13  	return a
    14  }
    15  

View as plain text