Remove a useless wrapper
This commit is contained in:
parent
13085b5e43
commit
64344659e3
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user