MCPcopy
hub / github.com/mrdoob/three.js / addScaledVector

Method addScaledVector

src/math/Vector3.js:278–286  ·  view source on GitHub ↗

* Adds the given vector scaled by the given factor to this instance. * * @param {Vector3|Vector4} v - The vector. * @param {number} s - The factor that scales `v`. * @return {Vector3} A reference to this vector.

( v, s )

Source from the content-addressed store, hash-verified

276 * @return {Vector3} A reference to this vector.
277 */
278 addScaledVector( v, s ) {
279
280 this.x += v.x * s;
281 this.y += v.y * s;
282 this.z += v.z * s;
283
284 return this;
285
286 }
287
288 /**
289 * Subtracts the given vector from this instance.

Callers 15

Vector2.tests.jsFile · 0.45
Vector3.tests.jsFile · 0.45
Vector4.tests.jsFile · 0.45
applyBoneTransformMethod · 0.45
getVertexPositionMethod · 0.45
handleTriangleMethod · 0.45
setupFunction · 0.45
scalePt2Method · 0.45
atMethod · 0.45
closestPointToPointMethod · 0.45
distanceSqToPointMethod · 0.45
distanceSqToSegmentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected