Approximate 35mm-equivalent focal length from a horizontal FOV.
Inverts the pinhole-camera relation
FOV = 2 · atan( sensorWidth / (2 · focalLength) )
to give
focalLength = sensorWidth / (2 · tan(FOV/2))
The result is rounded to the nearest integer mm — the slider only
displays whole-millimetre values, so any sub-mm precision would be
cosmetic.
Parameters
fovDegrees: number
Horizontal field of view in degrees, expected
to be in (0, 180). Outside this range the math still runs but
the result is meaningless: tan(±90°) → ±∞ → focalLength → 0.
Approximate 35mm-equivalent focal length from a horizontal FOV.
Inverts the pinhole-camera relation FOV = 2 · atan( sensorWidth / (2 · focalLength) ) to give focalLength = sensorWidth / (2 · tan(FOV/2))
The result is rounded to the nearest integer mm — the slider only displays whole-millimetre values, so any sub-mm precision would be cosmetic.