bevy_core_pipeline::dof

Function calculate_focal_length

Source
pub fn calculate_focal_length(sensor_height: f32, fov: f32) -> f32
Expand description

Given the sensor height and the FOV, returns the focal length.

See https://photo.stackexchange.com/a/97218.