MCPcopy
hub / github.com/graphif/project-graph / subtract

Method subtract

packages/data-structures/src/Vector.ts:26–28  ·  view source on GitHub ↗
(vector: Vector)

Source from the content-addressed store, hash-verified

24 }
25
26 subtract(vector: Vector): Vector {
27 return new Vector(this.x - vector.x, this.y - vector.y);
28 }
29
30 multiply(scalar: number): Vector {
31 return new Vector(this.x * scalar, this.y * scalar);

Callers 15

constructorMethod · 0.95
constructorMethod · 0.95
getRectangleMethod · 0.45
computeFunctionMethod · 0.45
lengthMethod · 0.45
directionMethod · 0.45
isPointNearLineMethod · 0.45
isCollinearMethod · 0.45
inCenterMethod · 0.45
fromPointsMethod · 0.45
Vector.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected