Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/restyled/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jabibamman committed Oct 29, 2023
2 parents 7b7582b + 38f7045 commit c0425a2
Show file tree
Hide file tree
Showing 23 changed files with 22 additions and 45 deletions.
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ edition = "2021"


[dependencies.shared]
path = "../shared"
path = "../shared"
1 change: 1 addition & 0 deletions client/src/calculations.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions client/src/client.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion client/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main() {
println!("[CLIENT] Hello, world!");
}
}
2 changes: 1 addition & 1 deletion client/src/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod calculations;
pub mod client;
pub mod client;
2 changes: 1 addition & 1 deletion complex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ edition = "2021"


[dependencies.shared]
path = "../shared"
path = "../shared"
27 changes: 0 additions & 27 deletions complex/src/complex_impl.rs
Original file line number Diff line number Diff line change
@@ -1,27 +0,0 @@
// Les implémentations de pour les nombres complexes
impl Complex {
pub fn new(re: f64, im: f64) -> Self {
Complex { re, im }
}

pub fn add(self, other: &Self) -> Self {
Complex::new(self.re + other.re, self.im + other.im)
}

pub fn mul(self, other: &Self) -> Self {
Complex::new(
self.re * other.re - self.im * other.im,
self.re * other.im + self.im * other.re,
)
}

pub fn square(&self) -> Self {
self.mul(&self)
}

pub fn magnitude_squared(&self) -> f64 {
self.re * self.re + self.im * self.im
}
}

fn main() {}
2 changes: 1 addition & 1 deletion complex/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub mod complex_impl;
pub mod complex_impl;
2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ edition = "2021"


[dependencies.shared]
path = "../shared"
path = "../shared"
1 change: 1 addition & 0 deletions server/src/handler.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions server/src/image.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 2 additions & 2 deletions server/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main() {
println!("[SERVER] Hello, world!");
}
println!("[SERVER] Hello, world!");
}
2 changes: 1 addition & 1 deletion shared/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod types;
pub mod utils;
pub mod utils;
2 changes: 1 addition & 1 deletion shared/src/types/complex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pub struct Complex {
pub re: f64,
pub im: f64,
}
}
1 change: 0 additions & 1 deletion shared/src/types/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ pub struct FragmentResult {
pub pixel_data: PixelData,
pub pixel_intensity: Vec<PixelIntensity>,
}

2 changes: 1 addition & 1 deletion shared/src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub mod complex;
pub mod messages;
pub mod pixel_intensity;
pub mod pixel_data;
pub mod pixel_intensity;
pub mod point;
pub mod range;
pub mod resolution;
Expand Down
2 changes: 1 addition & 1 deletion shared/src/types/pixel_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pub struct PixelData {
pub offset: u32,
pub count: u32,
}
}
2 changes: 1 addition & 1 deletion shared/src/types/pixel_intensity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pub struct PixelIntensity {
pub zn: f32,
pub count: f32,
}
}
2 changes: 1 addition & 1 deletion shared/src/types/point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pub struct Point {
pub x: f64,
pub y: f64,
}
}
2 changes: 1 addition & 1 deletion shared/src/types/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ use crate::types::point::Point;
pub struct Range {
pub min: Point,
pub max: Point,
}
}
2 changes: 1 addition & 1 deletion shared/src/types/resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pub struct Resolution {
pub nx: u16,
pub ny: u16,
}
}
2 changes: 1 addition & 1 deletion shared/src/types/u8data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
pub struct U8Data {
pub offset: u32,
pub count: u32,
}
}
1 change: 1 addition & 0 deletions shared/src/utils.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit c0425a2

Please sign in to comment.