cleanup warnings/weird code
This commit is contained in:
@@ -221,11 +221,11 @@ impl U4Lzw {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn hash_primary(root: u8, code: u16) -> usize {
|
fn hash_primary(root: u8, code: u16) -> usize {
|
||||||
((root as (u16) << 4) ^ code) as usize
|
(((root as u16) << 4) ^ code) as usize
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_secondary(root: u8, code: u16) -> usize {
|
fn hash_secondary(root: u8, code: u16) -> usize {
|
||||||
let base = (((root as (u16) << 1) + code) | 0x800) as u32;
|
let base = ((((root as u16) << 1) + code) | 0x800) as u32;
|
||||||
let squared = base * base;
|
let squared = base * base;
|
||||||
((squared & 0x0003ffc0) >> 6) as usize
|
((squared & 0x0003ffc0) >> 6) as usize
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ impl ViewRoot<gfx_device_gl::Device, ColorFormat, DepthFormat> {
|
|||||||
let depth = &buffers.as_ref().expect("vr depth buffer").depth;
|
let depth = &buffers.as_ref().expect("vr depth buffer").depth;
|
||||||
|
|
||||||
let proj_mat = vr.projection_matrix(eye, NEAR, FAR);
|
let proj_mat = vr.projection_matrix(eye, NEAR, FAR);
|
||||||
let mut eye_mat = vr.head_to_eye_transform(eye);
|
let eye_mat = vr.head_to_eye_transform(eye);
|
||||||
let scene_mat = scene.origin();
|
let scene_mat = scene.origin();
|
||||||
let viewmodel_mat = eye_mat * hmd_mat * scene_mat;
|
let viewmodel_mat = eye_mat * hmd_mat * scene_mat;
|
||||||
let trans = Trans { viewmodel: *viewmodel_mat.as_ref(),
|
let trans = Trans { viewmodel: *viewmodel_mat.as_ref(),
|
||||||
|
|||||||
Reference in New Issue
Block a user