MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / sub

Method sub

src/main/java/field/linalg/Vec3.java:251–257  ·  view source on GitHub ↗

Subtract v2 from v1 and store the result in dest . @param v1 the vector to subtract from @param v2 the vector to subtract @param dest will hold the result (automatically allocated if null) @return dest

(Vec3 v1, Vec3 v2, Vec3 dest)

Source from the content-addressed store, hash-verified

249 * @return dest
250 */
251 public static Vec3 sub(Vec3 v1, Vec3 v2, Vec3 dest) {
252 if (dest == null) dest = new Vec3();
253 dest.x = v1.x - v2.x;
254 dest.y = v1.y - v2.y;
255 dest.z = v1.z - v2.z;
256 return dest;
257 }
258
259 /**
260 * Adds <code>v2</code> from <code>v1</code> and store the result in <code>dest</code>.

Callers 6

circumcenterOfMethod · 0.95
tangentForwardMethod · 0.95
rotateToXMethod · 0.95
rayMethod · 0.95
polarCubicTo3Method · 0.95
__sub__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected