Remove a useless wrapper

This commit is contained in:
numzero 2024-06-28 14:59:28 +03:00
parent 13085b5e43
commit 64344659e3

View File

@ -236,16 +236,6 @@ mod coords {
}
}
impl Tube {
fn flat_to_global(&self, at: Vec2) -> Mat2 {
Mat2::from(self.sqrt_at(at).inverse())
}
fn global_to_flat(&self, at: Vec2) -> Mat2 {
Mat2::from(self.sqrt_at(at))
}
}
impl MapperInner<Location> for Tube {
fn inner_to_global(self, loc: Location) -> Location {
todo!()
@ -255,7 +245,7 @@ mod coords {
fn global_to_inner(self, loc: Location) -> Location {
Location {
pos: vec2(loc.pos.x, self.v(loc.pos.y)), // в плоской СК для Inner или её продолжении на Outer
rot: self.global_to_flat(loc.pos) * loc.rot,
rot: Mat2::from(self.sqrt_at(loc.pos)) * loc.rot,
}
}
}
@ -273,7 +263,7 @@ mod coords {
let v = self.v(y) + y.signum() * (self.external_halflength - self.internal_halflength);
Location {
pos: vec2(u, v), // в плоском продолжении СК Outer на область Inner
rot: self.global_to_flat(loc.pos) * loc.rot,
rot: Mat2::from(self.sqrt_at(loc.pos)) * loc.rot,
}
} else {
loc