Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for max (0.12 sec)

  1. src/bytes/buffer_test.go

    	var bb Buffer
    	bb.Grow(16 << 20)
    	b.SetBytes(int64(bb.Available()))
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		bb.Reset()
    		b := bb.AvailableBuffer()
    		b = b[:cap(b)] // use max capacity to simulate a large append operation
    		bb.Write(b)    // should be nearly infinitely fast
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. doc/go_spec.html

    (and similarly for <code>max</code>).
    If all arguments are constant, the result is constant.
    </p>
    
    <pre>
    var x, y int
    m := min(x)                 // m == x
    m := min(x, y)              // m is the smaller of x and y
    m := max(x, y, 10)          // m is the larger of x and y but at least 10
    c := max(1, 2.0, 10)        // c == 10.0 (floating-point kind)
    f := max(0, float32(x))     // type of f is float32
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top