Added example for AddConst

This commit is contained in:
btracey
2013-07-19 09:04:41 -07:00
parent 4984eea8d5
commit 8a881f32c1

View File

@@ -81,3 +81,14 @@ func ExampleAdd_sliceofslicesum() {
// Output:
// result = [0 5 10]
}
func ExampleAddConst() {
s := []float64{1, -2, 3, -4}
c := 5.0
AddConst(s, c)
fmt.Println("s = ", s)
// Output:
// s = [6 3 8 1]
}