Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit e308db4

Browse files
committed
Merge pull request #32 from NDari/typoCorrection
Fix Typo in the docs for Add()
2 parents 871a317 + 390c18a commit e308db4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vec/vec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,13 @@ the second argument is a float64:
313313
314314
val := 10
315315
v := []float64{1.0, 2.0, 3.0}
316-
vec.Mul(v, val) // v is now {11.0, 12.0, 13.0}
316+
vec.Add(v, val) // v is now {11.0, 12.0, 13.0}
317317
318318
The second argument can also we a []float64, as below:
319319
320320
v := []float64{1.0, 2.0, 3.0}
321321
w := []float64{3.0, 2.0, 4.0}
322-
vec.Mul(v, w) // v is now {4.0, 4.0, 7.0}
322+
vec.Add(v, w) // v is now {4.0, 4.0, 7.0}
323323
324324
The original []float64 (the first argument) is modified, but the second is not.
325325
In the case where the second argument is a []float64, the length of both

0 commit comments

Comments
 (0)