Changeset 0d6e865 in sasmodels for sasmodels/models/core_shell_cylinder.c
- Timestamp:
- Oct 11, 2016 11:42:00 AM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 1fdb555
- Parents:
- 19e7ca7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_cylinder.c
r43b7eea r0d6e865 69 69 70 70 // Compute angle alpha between q and the cylinder axis 71 SINCOS( theta*M_PI_180, sn, cn);71 SINCOS(phi*M_PI_180, sn, cn); 72 72 // # The following correction factor exists in sasview, but it can't be 73 73 // # right, so we are leaving it out for now. 74 74 // const double correction = fabs(cn)*M_PI_2; 75 75 const double q = sqrt(qx*qx+qy*qy); 76 const double cos_val = cn*cos(phi*M_PI_180)*(qx/q) + sn*(qy/q);76 const double cos_val = (q==0. ? 1.0 : (cn*qx + sn*qy)*sin(theta*M_PI_180)/q); 77 77 const double alpha = acos(cos_val); 78 78
Note: See TracChangeset
for help on using the changeset viewer.