示例#1
0
文件: talib_test.go 项目: gurre/talib
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)
	}
}
示例#2
0
func Example() {
	fmt.Println(talib.Sin([]float64{0, math.Pi / 2, math.Pi}))
	// Output: [0 1 1.2246467991473532e-16]
}