From b2d93572343f7106f9c80cffe2ae831cc0528644 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sun, 19 Feb 2023 21:39:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BA=86=E6=B2=A1=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Difficult_Rocket/client/render/sr1_ship.py | 1 - libs/Difficult_Rocket_rs/src/src/sr1_render.rs | 4 +--- libs/Difficult_Rocket_rs/src/src/types.rs | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Difficult_Rocket/client/render/sr1_ship.py b/Difficult_Rocket/client/render/sr1_ship.py index 320d45d..4f021ea 100644 --- a/Difficult_Rocket/client/render/sr1_ship.py +++ b/Difficult_Rocket/client/render/sr1_ship.py @@ -278,7 +278,6 @@ class SR1ShipRender(BaseScreen): mouse_dy_d *= (1 - zoom_d) self.camera_rs.zoom *= zoom_d if self.camera_rs.zoom * zoom_d >= 10: - zoom_d = 10 / self.camera_rs.zoom self.camera_rs.zoom = 10 self.camera_rs.dx += mouse_dx_d self.camera_rs.dy += mouse_dy_d diff --git a/libs/Difficult_Rocket_rs/src/src/sr1_render.rs b/libs/Difficult_Rocket_rs/src/src/sr1_render.rs index 2847d76..856e13b 100644 --- a/libs/Difficult_Rocket_rs/src/src/sr1_render.rs +++ b/libs/Difficult_Rocket_rs/src/src/sr1_render.rs @@ -55,9 +55,7 @@ pub mod types { Ok(ok) => { ok.extract()? } - _ => { - None - } + _ => None }; return Ok(SR1PartData{ diff --git a/libs/Difficult_Rocket_rs/src/src/types.rs b/libs/Difficult_Rocket_rs/src/src/types.rs index 9fd0094..715b88d 100644 --- a/libs/Difficult_Rocket_rs/src/src/types.rs +++ b/libs/Difficult_Rocket_rs/src/src/types.rs @@ -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 { 1.0 }