MCPcopy Create free account
hub / github.com/egonelbre/exp / Add

Method Add

bench/vector/mini/vector_test.go:13–19  ·  view source on GitHub ↗
(b Array)

Source from the content-addressed store, hash-verified

11
12func (a Struct) Add(b Struct) Struct { return Struct{a.X + b.X, a.Y + b.Y, a.Z + b.Z} }
13func (a Array) Add(b Array) Array {
14 r := Array{}
15 for i, bv := range b {
16 r[i] = a[i] + bv
17 }
18 return r
19}
20func (a Array) Add2(b Array) Array {
21 r := Array{}
22 for i := range b {

Callers 1

BenchmarkArrayFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected