Changeset c88f983 in sasmodels for sasmodels/kernel_iq.c
- Timestamp:
- Sep 8, 2018 5:29:57 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- c11d09f, 0159b5e
- Parents:
- 84f2962 (diff), 475ff58 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
rc036ddb rc88f983 191 191 QACRotation *rotation, 192 192 double qx, double qy, 193 double *qa _out, double *qc_out)193 double *qab_out, double *qc_out) 194 194 { 195 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 195 196 const double dqc = rotation->R31*qx + rotation->R32*qy; 196 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 197 const double dqa = sqrt(-dqc*dqc + qx*qx + qy*qy); 198 199 *qa_out = dqa; 197 const double dqab_sq = -dqc*dqc + qx*qx + qy*qy; 198 //*qab_out = sqrt(fabs(dqab_sq)); 199 *qab_out = dqab_sq > 0.0 ? sqrt(dqab_sq) : 0.0; 200 200 *qc_out = dqc; 201 201 }
Note: See TracChangeset
for help on using the changeset viewer.