MCPcopy Index your code
hub / github.com/gonum/plot / Add

Method Add

vg/geom.go:21–23  ·  view source on GitHub ↗

Add returns the component-wise sum of two points.

(q Point)

Source from the content-addressed store, hash-verified

19
20// Add returns the component-wise sum of two points.
21func (p Point) Add(q Point) Point {
22 return Point{p.X + q.X, p.Y + q.Y}
23}
24
25// Sub returns the component-wise difference of two points.
26func (p Point) Sub(q Point) Point {

Callers 15

PlotMethod · 0.95
TestMultiCanvasFunction · 0.45
linesFunction · 0.45
Example_addFontFunction · 0.45
Example_inMemoryCanvasFunction · 0.45
Example_writerToCanvasFunction · 0.45
AddMethod · 0.45
isectFunction · 0.45
ExampleFunction · 0.45
TestLineLatexFunction · 0.45
TestFillStyleFunction · 0.45
TestIssue179Function · 0.45

Calls

no outgoing calls

Tested by 15

TestMultiCanvasFunction · 0.36
linesFunction · 0.36
Example_addFontFunction · 0.36
Example_inMemoryCanvasFunction · 0.36
Example_writerToCanvasFunction · 0.36
ExampleFunction · 0.36
TestLineLatexFunction · 0.36
TestFillStyleFunction · 0.36
TestIssue179Function · 0.36
TestConcurrentInitFunction · 0.36
TestIssue540Function · 0.36
TestIssue687Function · 0.36