MCPcopy Create free account
hub / github.com/melonjs/melonJS / to2d

Method to2d

packages/melonjs/src/math/vector3d.ts:111–113  ·  view source on GitHub ↗

* Convert this vector into 2d coordinate space * @returns Reference to this object for method chaining

()

Source from the content-addressed store, hash-verified

109 * @returns Reference to this object for method chaining
110 */
111 to2d() {
112 return this.set(this.y + this.x / 2, this.y - this.x / 2, this.z);
113 }
114
115 /**
116 * Divide this vector values by the passed value

Callers 5

polygon.spec.jsFile · 0.45
vector2d.spec.tsFile · 0.45
vector3d.spec.tsFile · 0.45

Calls 1

setMethod · 0.95

Tested by

no test coverage detected