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

Function rotateSize

packages/client/src/features/viewport/viewportMath.ts:14–21  ·  view source on GitHub ↗
(size: Size, quarterTurns: number)

Source from the content-addressed store, hash-verified

12}
13
14function rotateSize(size: Size, quarterTurns: number): Size {
15 return normalizeQuarterTurns(quarterTurns) % 2 === 0
16 ? size
17 : {
18 height: size.width,
19 width: size.height,
20 };
21}
22
23export function shellSize(
24 deviceNaturalSize: Size | null,

Callers 1

shellSizeFunction · 0.85

Calls 1

normalizeQuarterTurnsFunction · 0.85

Tested by

no test coverage detected