diff options
author | Thomas White <taw@physics.org> | 2016-10-19 14:12:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-10-19 14:12:55 +0200 |
commit | dc4dd18561abf7403383ce3171ce3bd9c935a727 (patch) | |
tree | ee990543ffc0255471beed5685c9777ebc85651f | |
parent | 4b1136b3cdb9b32126f908415af59bccaa9542ea (diff) |
Formatting
-rw-r--r-- | libcrystfel/src/taketwo.c | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c index b37123e4..8b5fadbd 100644 --- a/libcrystfel/src/taketwo.c +++ b/libcrystfel/src/taketwo.c @@ -713,45 +713,44 @@ static int gen_observed_vecs(struct rvec *rlps, int rlp_count, /* maximum distance squared for comparisons */ double max_sq_length = pow(MAX_RECIP_DISTANCE, 2); - /* Indentation... bending the rules a bit? */ for ( i=0; i<rlp_count-1; i++ ) { - for ( j=i+1; j<rlp_count; j++ ) { + for ( j=i+1; j<rlp_count; j++ ) { - /* calculate difference vector between rlps */ - struct rvec diff = diff_vec(rlps[i], rlps[j]); + /* calculate difference vector between rlps */ + struct rvec diff = diff_vec(rlps[i], rlps[j]); - /* are these two far from each other? */ - double sqlength = sq_length(diff); + /* are these two far from each other? */ + double sqlength = sq_length(diff); - if ( sqlength > max_sq_length ) { - continue; - } + if ( sqlength > max_sq_length ) { + continue; + } - count++; + count++; - struct SpotVec *temp_obs_vecs; - temp_obs_vecs = realloc(*obs_vecs, - count*sizeof(struct SpotVec)); + struct SpotVec *temp_obs_vecs; + temp_obs_vecs = realloc(*obs_vecs, + count*sizeof(struct SpotVec)); - if ( temp_obs_vecs == NULL ) { - return 0; - } else { - *obs_vecs = temp_obs_vecs; + if ( temp_obs_vecs == NULL ) { + return 0; + } else { + *obs_vecs = temp_obs_vecs; - /* initialise all SpotVec struct members */ + /* initialise all SpotVec struct members */ - struct SpotVec spot_vec; - spot_vec.obsvec = diff; - spot_vec.distance = sqrt(sqlength); - spot_vec.matches = NULL; - spot_vec.match_num = 0; - spot_vec.her_rlp = &rlps[i]; - spot_vec.his_rlp = &rlps[j]; + struct SpotVec spot_vec; + spot_vec.obsvec = diff; + spot_vec.distance = sqrt(sqlength); + spot_vec.matches = NULL; + spot_vec.match_num = 0; + spot_vec.her_rlp = &rlps[i]; + spot_vec.his_rlp = &rlps[j]; - (*obs_vecs)[count - 1] = spot_vec; + (*obs_vecs)[count - 1] = spot_vec; + } } } - } *obs_vec_count = count; |