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

Method abs

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

* Update this vector values to absolute values * @returns Reference to this object for method chaining

()

Source from the content-addressed store, hash-verified

126 * @returns Reference to this object for method chaining
127 */
128 abs() {
129 return this.set(
130 this.x < 0 ? -this.x : this.x,
131 this.y < 0 ? -this.y : this.y,
132 this.z < 0 ? -this.z : this.z,
133 );
134 }
135
136 /**
137 * Clamp the vector value within the specified value range

Callers 15

raycastMethod · 0.45
parity.spec.tsFile · 0.45
isSeparatingAxisFunction · 0.45
testPolygonEllipseFunction · 0.45
_raycastPolygonFunction · 0.45
getScreenOrientationFunction · 0.45
fixOverlappingCornersFunction · 0.45
ellipseFunction · 0.45
overlapsMethod · 0.45
_updateBoundsMethod · 0.45
findHoleBridgeFunction · 0.45

Calls 1

setMethod · 0.95

Tested by

no test coverage detected