Пример #1
0
// Plus computes the sum of two images.
// Does not modify either input.
func (f *Multi) Plus(g *Multi) *Multi {
	dst := NewMulti(f.Width, f.Height, f.Channels)
	floats.AddTo(dst.Elems, f.Elems, g.Elems)
	return dst
}
Пример #2
0
// Plus computes the sum of two images.
// Does not modify either input.
func (f *Image) Plus(g *Image) *Image {
	dst := New(f.Width, f.Height)
	floats.AddTo(dst.Elems, f.Elems, g.Elems)
	return dst
}