Skip to content

Commit a0f0e2d

Browse files
committed
Merge #143
143: Rename get_aspect as aspect_ratio r=vitvakatu a=alteous Closes #142.
2 parents c0132af + 7a624e5 commit a0f0e2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/render/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ impl Renderer {
480480
gfx_window_glutin::update_views(window, &mut self.out_color, &mut self.out_depth);
481481
}
482482

483-
/// Returns current viewport aspect, i.e. width / height.
484-
pub fn get_aspect(&self) -> f32 {
483+
/// Returns current viewport aspect ratio, i.e. width / height.
484+
pub fn aspect_ratio(&self) -> f32 {
485485
self.size.0 as f32 / self.size.1 as f32
486486
}
487487

@@ -653,7 +653,7 @@ impl Renderer {
653653

654654
// prepare target and globals
655655
let (mx_inv_proj, mx_view, mx_vp) = {
656-
let p: [[f32; 4]; 4] = camera.matrix(self.get_aspect()).into();
656+
let p: [[f32; 4]; 4] = camera.matrix(self.aspect_ratio()).into();
657657
let node = &hub.nodes[&camera.object.node];
658658
let w = match node.scene_id {
659659
Some(id) if Some(id) == scene_id => node.world_transform,

0 commit comments

Comments
 (0)