forked from StudioInfinity/dyna3
refactor: Code formatting (#108)
Primarily, switch to using trailing commas. Also uniformizes commas with respect to switch branches, makes function call layout more consistent, line breaking more consistent, alphabetizes imports, uses the field init shorthand when possible, etc. Resolves #99. Co-authored-by: Aaron Fenyes <aaron.fenyes@fareycircles.ooo> Reviewed-on: StudioInfinity/dyna3#108 Co-authored-by: Vectornaut <vectornaut@nobody@nowhere.net> Co-committed-by: Vectornaut <vectornaut@nobody@nowhere.net>
This commit is contained in:
parent
2eba80fb69
commit
ef1a579ac0
12 changed files with 310 additions and 297 deletions
|
@ -23,7 +23,7 @@ fn main() {
|
|||
let twist_motion: DMatrix<_> = (0..N_POINTS).step_by(4).flat_map(
|
||||
|n| [
|
||||
tangent.proj(&up.as_view(), n),
|
||||
tangent.proj(&down.as_view(), n+1)
|
||||
tangent.proj(&down.as_view(), n+1),
|
||||
]
|
||||
).sum();
|
||||
let normalization = 5.0 / twist_motion[(2, 0)];
|
||||
|
|
|
@ -6,7 +6,7 @@ use dyna3::engine::{
|
|||
realize_gram,
|
||||
sphere,
|
||||
ConfigNeighborhood,
|
||||
ConstraintProblem
|
||||
ConstraintProblem,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
|
@ -25,7 +25,7 @@ fn main() {
|
|||
);
|
||||
print::title("Point on a sphere");
|
||||
print::realization_diagnostics(&realization);
|
||||
if let Ok(ConfigNeighborhood{ config, .. }) = realization.result {
|
||||
if let Ok(ConfigNeighborhood { config, .. }) = realization.result {
|
||||
print::gram_matrix(&config);
|
||||
print::config(&config);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ use dyna3::engine::{
|
|||
realize_gram,
|
||||
sphere,
|
||||
ConfigNeighborhood,
|
||||
ConstraintProblem
|
||||
ConstraintProblem,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
|
@ -14,7 +14,7 @@ fn main() {
|
|||
&[
|
||||
sphere(1.0, 0.0, 0.0, 1.0),
|
||||
sphere(-0.5, a, 0.0, 1.0),
|
||||
sphere(-0.5, -a, 0.0, 1.0)
|
||||
sphere(-0.5, -a, 0.0, 1.0),
|
||||
]
|
||||
});
|
||||
for j in 0..3 {
|
||||
|
@ -27,7 +27,7 @@ fn main() {
|
|||
);
|
||||
print::title("Three spheres");
|
||||
print::realization_diagnostics(&realization);
|
||||
if let Ok(ConfigNeighborhood{ config, .. }) = realization.result {
|
||||
if let Ok(ConfigNeighborhood { config, .. }) = realization.result {
|
||||
print::gram_matrix(&config);
|
||||
}
|
||||
print::loss_history(&realization.history);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue