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

     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  package quic
     6  
     7  func abs[T ~int | ~int64](a T) T {
     8  	if a < 0 {
     9  		return -a
    10  	}
    11  	return a
    12  }
    13  

View as plain text