Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ExampleMin (0.27 sec)

  1. src/slices/example_test.go

    		{"Bob", 55},
    	}
    	firstOldest := slices.MaxFunc(people, func(a, b Person) int {
    		return cmp.Compare(a.Age, b.Age)
    	})
    	fmt.Println(firstOldest.Name)
    	// Output:
    	// Alice
    }
    
    func ExampleMin() {
    	numbers := []int{0, 42, -10, 8}
    	fmt.Println(slices.Min(numbers))
    	// Output:
    	// -10
    }
    
    func ExampleMinFunc() {
    	type Person struct {
    		Name string
    		Age  int
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. src/math/example_test.go

    	// Output: -3.20
    }
    
    func ExampleCos() {
    	fmt.Printf("%.2f", math.Cos(math.Pi/2))
    	// Output: 0.00
    }
    
    func ExampleCosh() {
    	fmt.Printf("%.2f", math.Cosh(0))
    	// Output: 1.00
    }
    
    func ExampleSin() {
    	fmt.Printf("%.2f", math.Sin(math.Pi))
    	// Output: 0.00
    }
    
    func ExampleSincos() {
    	sin, cos := math.Sincos(0)
    	fmt.Printf("%.2f, %.2f", sin, cos)
    	// Output: 0.00, 1.00
    }
    
    func ExampleSinh() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 18:09:53 UTC 2021
    - 3.7K bytes
    - Viewed (0)
Back to top