MCPcopy Create free account
hub / github.com/graphif/project-graph / fromAngle

Method fromAngle

packages/data-structures/src/Vector.ts:161–165  ·  view source on GitHub ↗

* 根据角度构造一个单位向量 * @param angle 单位:弧度

(angle: number)

Source from the content-addressed store, hash-verified

159 * @param angle 单位:弧度
160 */
161 static fromAngle(angle: number): Vector {
162 const x = Math.cos(angle);
163 const y = Math.sin(angle);
164 return new Vector(x, y);
165 }
166
167 /**
168 * 根据角度构造一个单位向量

Callers 2

fromDegreesMethod · 0.80
Vector.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected