MCPcopy Create free account
hub / github.com/codeaashu/claude-code / resolveValue

Function resolveValue

src/native-ts/yoga-layout/index.ts:97–106  ·  view source on GitHub ↗
(v: Value, ownerSize: number)

Source from the content-addressed store, hash-verified

95}
96
97function resolveValue(v: Value, ownerSize: number): number {
98 switch (v.unit) {
99 case Unit.Point:
100 return v.value
101 case Unit.Percent:
102 return isNaN(ownerSize) ? NaN : (v.value * ownerSize) / 100
103 default:
104 return NaN
105 }
106}
107
108function isDefined(n: number): boolean {
109 return !isNaN(n)

Callers 6

resolveEdgeFunction · 0.70
calculateLayoutMethod · 0.70
layoutNodeFunction · 0.70
layoutAbsoluteChildFunction · 0.70
computeFlexBasisFunction · 0.70
resolveGapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected