Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
busstoptaktik committed Mar 20, 2024
1 parent 8800929 commit 1e27657
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/coordinate/coor2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,8 @@ impl Coor2D {
pub fn hypot2(&self, other: &Self) -> f64 {
(self[0] - other[0]).hypot(self[1] - other[1])
}

}


impl From<Coor2D> for Coor4D {
fn from(c: Coor2D) -> Self {
Coor4D([c[0], c[1], 0.0, 0.0])
Expand Down
1 change: 0 additions & 1 deletion src/coordinate/coor3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ impl Coor3D {
.hypot(self[1] - other[1])
.hypot(self[2] - other[2])
}

}

// ----- T E S T S ---------------------------------------------------
Expand Down
9 changes: 6 additions & 3 deletions src/coordinate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ pub trait CoordTrait {

/// Returns a tuple that contains the three first components of the coord converted to f64.
fn xyzt_as_f64(&self) -> (f64, f64, f64, f64) {
(self.x_as_f64(), self.y_as_f64(), self.z_as_f64(), self.t_as_f64())
(
self.x_as_f64(),
self.y_as_f64(),
self.z_as_f64(),
self.t_as_f64(),
)
}
}

Expand Down Expand Up @@ -207,8 +212,6 @@ impl CoordTrait for Coor2D {
}
}



impl CoordTrait for Coor32 {
type T = f32;
const DIMENSION: usize = 2;
Expand Down
4 changes: 2 additions & 2 deletions src/ellipsoid/geodesics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ impl Ellipsoid {
#[must_use]
pub fn distance<T>(&self, from: &T, to: &T) -> f64
where
T: CoordTrait
T: CoordTrait,
{
self.geodesic_inv::<T>(&from, &to)[2]
self.geodesic_inv::<T>(from, to)[2]
}
}

Expand Down
1 change: 0 additions & 1 deletion src/inner_op/molodensky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ mod tests {
use super::*;
use crate::math::angular;


#[test]
fn molodensky() -> Result<(), Error> {
let mut ctx = Minimal::default();
Expand Down

0 comments on commit 1e27657

Please sign in to comment.