MCPcopy Index your code
hub / github.com/piqnt/planck.js / getRandomAABB

Function getRandomAABB

example/DynamicTreeTest.ts:197–205  ·  view source on GitHub ↗
(aabb: AABB)

Source from the content-addressed store, hash-verified

195};
196
197function getRandomAABB(aabb: AABB) {
198 // aabb.lowerBound.x = -proxyExtent;
199 // aabb.lowerBound.y = -proxyExtent + worldExtent;
200 aabb.lowerBound.x = Math.random(-WORLD_EXTENT, WORLD_EXTENT);
201 aabb.lowerBound.y = Math.random(0.0, 2.0 * WORLD_EXTENT);
202
203 aabb.upperBound.x = aabb.lowerBound.x + 2.0 * PROXY_EXTENT;
204 aabb.upperBound.y = aabb.lowerBound.y + 2.0 * PROXY_EXTENT;
205}
206
207function moveAABB(aabb: AABB) {
208 const d = {

Callers 2

DynamicTreeTest.tsFile · 0.85
createProxyFunction · 0.85

Calls 1

randomMethod · 0.80

Tested by

no test coverage detected