MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / candidateNormalizedTransforms

Function candidateNormalizedTransforms

scripts/integration/cli.mjs:1568–1585  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

1566}
1567
1568function candidateNormalizedTransforms(x, y) {
1569 return uniqueUnitPoints([
1570 { x, y },
1571 { x: y, y: x },
1572 { x: 1 - x, y },
1573 { x, y: 1 - y },
1574 { x: 1 - x, y: 1 - y },
1575 { x: y, y: 1 - x },
1576 { x: 1 - y, y: x },
1577 { x: 1 - y, y: 1 - x },
1578 ]).filter(
1579 (candidate) =>
1580 candidate.x >= 0 &&
1581 candidate.x <= 1 &&
1582 candidate.y >= 0 &&
1583 candidate.y <= 1,
1584 );
1585}
1586
1587function rootBounds(snapshot) {
1588 const match = snapshot.match(

Callers 1

Calls 1

uniqueUnitPointsFunction · 0.85

Tested by

no test coverage detected