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

Method divide

packages/data-structures/src/Vector.ts:34–39  ·  view source on GitHub ↗
(scalar: number)

Source from the content-addressed store, hash-verified

32 }
33
34 divide(scalar: number): Vector {
35 if (scalar === 0) {
36 return Vector.getZero();
37 }
38 return new Vector(this.x / scalar, this.y / scalar);
39 }
40
41 /**
42 * 获得向量的模长

Callers 15

computeFunctionMethod · 0.80
inCenterMethod · 0.80
centerMethod · 0.80
getCenterMethod · 0.80
Vector.test.tsFile · 0.80
generateFullViewFunction · 0.80
renderTextFromCenterMethod · 0.80

Calls 1

getZeroMethod · 0.80

Tested by

no test coverage detected