Changeset 2773c66 in sasmodels for sasmodels/kernel_iq.c
- Timestamp:
- Sep 8, 2018 10:29:05 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:
- ba51e00
- Parents:
- b763f9d (diff), c88f983 (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
rc57ee9e r2773c66 192 192 QACRotation *rotation, 193 193 double qx, double qy, 194 double *qa _out, double *qc_out)194 double *qab_out, double *qc_out) 195 195 { 196 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 196 197 const double dqc = rotation->R31*qx + rotation->R32*qy; 197 // Indirect calculation of qab, from qab^2 = |q|^2 - qc^2 198 const double dqa = sqrt(-dqc*dqc + qx*qx + qy*qy); 199 200 *qa_out = dqa; 198 const double dqab_sq = -dqc*dqc + qx*qx + qy*qy; 199 //*qab_out = sqrt(fabs(dqab_sq)); 200 *qab_out = dqab_sq > 0.0 ? sqrt(dqab_sq) : 0.0; 201 201 *qc_out = dqc; 202 202 }
Note: See TracChangeset
for help on using the changeset viewer.