MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / ratio

Function ratio

apps/api/src/agents/tools/session.ts:163–170  ·  view source on GitHub ↗
(a: number, b: number)

Source from the content-addressed store, hash-verified

161 };
162
163 const ratio = (a: number, b: number) => {
164 if (b === 0) return { ratio: 0, label: 'equal' as const };
165 const r = a / b;
166 return {
167 ratio: Number(r.toFixed(2)),
168 label: r > 1.05 ? ('above' as const) : r < 0.95 ? ('below' as const) : ('equal' as const),
169 };
170 };
171
172 return {
173 session: {

Callers 1

session.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected