diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-05-17 22:55:31 +0200 |
| commit | c975d0d5e989cca6eff8e80ca8174f85eb4a3460 (patch) | |
| tree | 7aaf68ee71d81a1d71d7dcb1f928659bc6fa975d /src/geom/gen.rs | |
| parent | 24c4a746bc68874f2d1b0d1b726596930acaadcf (diff) | |
Tidy up layouting code
Diffstat (limited to 'src/geom/gen.rs')
| -rw-r--r-- | src/geom/gen.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/geom/gen.rs b/src/geom/gen.rs index 7e021412..91f7499c 100644 --- a/src/geom/gen.rs +++ b/src/geom/gen.rs @@ -3,24 +3,24 @@ use super::*; /// A container with a main and cross component. #[derive(Default, Copy, Clone, Eq, PartialEq)] pub struct Gen<T> { - /// The main component. - pub main: T, /// The cross component. pub cross: T, + /// The main component. + pub main: T, } impl<T> Gen<T> { /// Create a new instance from the two components. - pub fn new(main: T, cross: T) -> Self { - Self { main, cross } + pub fn new(cross: T, main: T) -> Self { + Self { cross, main } } /// Create a new instance with two equal components. - pub fn uniform(value: T) -> Self + pub fn splat(value: T) -> Self where T: Clone, { - Self { main: value.clone(), cross: value } + Self { cross: value.clone(), main: value } } } |
