File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ use rand::Rng;
12
12
use rayon:: prelude:: * ;
13
13
14
14
#[ derive( Clone , Copy , Debug ) ]
15
- struct Point {
15
+ pub struct Point {
16
16
x : i32 ,
17
17
y : i32 ,
18
18
}
19
19
20
20
impl Point {
21
- fn cross_product ( & self , b : Point ) -> i32 {
21
+ pub fn cross_product ( & self , b : Point ) -> i32 {
22
22
self . x * b. y - self . y * b. x
23
23
}
24
24
}
@@ -125,7 +125,7 @@ impl Primitive for Triangle {
125
125
}
126
126
}
127
127
128
- trait PointGenerator {
128
+ pub trait PointGenerator {
129
129
fn next_point ( & mut self , width : u32 , height : u32 ) -> Point ;
130
130
}
131
131
@@ -149,13 +149,13 @@ impl PointGenerator for RandomPointGenerator {
149
149
}
150
150
151
151
pub struct Geometrify {
152
- point_gen : Box < RandomPointGenerator > ,
152
+ point_gen : Box < PointGenerator > ,
153
153
iterations : u32 ,
154
154
samples : u32 ,
155
155
}
156
156
157
157
impl Geometrify {
158
- pub fn new ( point_gen : Box < RandomPointGenerator > , iterations : u32 , samples : u32 ) -> Geometrify {
158
+ pub fn new ( point_gen : Box < PointGenerator > , iterations : u32 , samples : u32 ) -> Geometrify {
159
159
Geometrify {
160
160
point_gen : point_gen,
161
161
iterations : iterations,
You can’t perform that action at this time.
0 commit comments