Bookmark this: tool.io/lighting/lumens-to-lux-calculator/source-code
Lumens to Lux Calculator Source Code
Browse the implementation files for Lumens to Lux Calculator.tool.ts typescript
const parseFinite = (value: unknown): number | null => {
if (value === '' || value === null || value === undefined)
return null;
const parsed = Number(value);
return Number.isFinite(parsed) ? parsed : null;
};
export const lumenToLux = (
fluxInput: unknown,
areaInput: unknown
) => {
const flux = parseFinite(fluxInput);
const area = parseFinite(areaInput);
if (flux === null || flux < 0 || area === null || area <= 0)
return '';
return flux / area;
};
export const Tool: TypeTool = {
name: 'Lumens to Lux Calculator',
slug: 'lighting/lumens-to-lux-calculator',
tool: lumenToLux,
intro:
'Calculate average illuminance from luminous flux distributed uniformly across a known surface area.',
i: [
{
example: '1000',
label: 'Luminous flux',
placeholder: 'Lumens (lm)',
type: 'number'
},
{
example: '10',
label: 'Illuminated area',
placeholder: 'Square meters (m²)',
type: 'number'
}
],
o: [
{
example: '100',
label: 'Average illuminance',
placeholder: 'Lux (lx)',
render: 'textarea',
type: 'number'
}
],
equation: 'Eᵥ = Φᵥ / A',
alternative: [
{
title: 'Room Lighting Calculator',
url: '/lighting/room-lighting-calculator'
},
{
title: 'Foot-Candle Calculator',
url: '/lighting/foot-candle-calculator'
},
{
title: 'Candela to Lux Calculator',
url: '/lighting/candela-to-lux-calculator'
},
{
title: 'Convert illuminance',
url: '/convert/illuminance'
},
{
title: 'Convert luminous flux',
url: '/convert/luminous-flux'
}
],
cite: [
{
title: 'Lux — NIST',
url: 'https://www.nist.gov/glossary-term/26871'
}
]
};
export default Tool;
Description
Browse the implementation files for Lumens to Lux Calculator.