pub fn with_viewport(viewport_height: f32, aspect_ratio: f32) -> Self {
        let viewport_width = viewport_height * aspect_ratio;
        Self {
            projection: Self::centered_ortho(viewport_width, viewport_height),
            view: na::Translation2::identity(),
            viewport_height,
            viewport_width,
        }
    }
/// Build a new camera with a given viewport height and aspect ratio.
///
/// # Params
///
/// - `viewport_height` defines the height of the view rectangle in world
///   space.
/// - `aspect_ratio` is the ratio of the desired viewport's `width/height`.
Build a new camera with a given viewport height and aspect ratio.
Build a new camera with a given viewport height and aspect ratio .
pub fn with_viewport(viewport_height: f32, aspect_ratio: f32) -> Self {
        let viewport_width = viewport_height * aspect_ratio;
        Self {
            projection: Self::centered_ortho(viewport_width, viewport_height),
            view: na::Translation2::identity(),
            viewport_height,
            viewport_width,
        }
    }
pub fn with_viewport ( viewport_height : f32 , aspect_ratio : f32 ) -> Self { let viewport_width = viewport_height * aspect_ratio ; Self { projection : Self :: centered_ortho ( viewport_width , viewport_height ) , view : na :: Translation2 :: identity ( ) , viewport_height , viewport_width , } }
Build a new camera with a given viewport height and aspect ratio.
Build a new camera with a given viewport height and aspect ratio .
viewport_height
f32
aspect_ratio
f32
params
`viewport_height` defines the height of the view rectangle in world
space.
`aspect_ratio` is the ratio of the desired viewport's `width/height`.
` viewport_height ` defines the height of the view rectangle in world space . ` aspect_ratio ` is the ratio of the desired viewport ' s ` width / height ` .