MCPcopy Create free account
hub / github.com/apache/groovy / add

Method add

benchmark/bench/raytracer.java:13–13  ·  view source on GitHub ↗
(Vec a, Vec b)

Source from the content-addressed store, hash-verified

11 public Vec(double x2, double y2, double z2) { x=x2; y=y2; z=z2; }
12 }
13 Vec add(Vec a, Vec b) { return new Vec(a.x+b.x, a.y+b.y, a.z+b.z); }
14 Vec sub(Vec a, Vec b) { return new Vec(a.x-b.x, a.y-b.y, a.z-b.z); }
15 Vec scale(double s, Vec a) { return new Vec(s*a.x, s*a.y, s*a.z); }
16 double dot(Vec a, Vec b) { return a.x*b.x + a.y*b.y + a.z*b.z; }

Callers 1

ray_traceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected