去掉了没用的代码

This commit is contained in:
shenjack 2023-02-19 21:39:39 +08:00
parent c219da2e5b
commit b2d9357234
3 changed files with 5 additions and 4 deletions

View File

@ -278,7 +278,6 @@ class SR1ShipRender(BaseScreen):
mouse_dy_d *= (1 - zoom_d) mouse_dy_d *= (1 - zoom_d)
self.camera_rs.zoom *= zoom_d self.camera_rs.zoom *= zoom_d
if self.camera_rs.zoom * zoom_d >= 10: if self.camera_rs.zoom * zoom_d >= 10:
zoom_d = 10 / self.camera_rs.zoom
self.camera_rs.zoom = 10 self.camera_rs.zoom = 10
self.camera_rs.dx += mouse_dx_d self.camera_rs.dx += mouse_dx_d
self.camera_rs.dy += mouse_dy_d self.camera_rs.dy += mouse_dy_d

View File

@ -55,9 +55,7 @@ pub mod types {
Ok(ok) => { Ok(ok) => {
ok.extract()? ok.extract()?
} }
_ => { _ => None
None
}
}; };
return Ok(SR1PartData{ return Ok(SR1PartData{

View File

@ -206,6 +206,10 @@ pub mod math {
} }
} }
pub fn rotate(&self, angle: f64) -> Self {
OneTimeLine::point_new(&self.start.rotate_angle(angle), &self.end.rotate_angle(angle))
}
pub fn point_d() -> f64 { pub fn point_d() -> f64 {
1.0 1.0
} }