Esempio n. 1
0
func TestSin(t *testing.T) {
	out := talib.Sin([]float64{0, math.Pi / 2})
	expected := []float64{0, 1}
	if !reflect.DeepEqual(expected, out) {
		t.Errorf("Expected %#v got %#v.", expected, out)
	}
}
Esempio n. 2
0
func Example() {
	fmt.Println(talib.Sin([]float64{0, math.Pi / 2, math.Pi}))
	// Output: [0 1 1.2246467991473532e-16]
}