24 sqrt(q.
x() * q.
x() + q.
y() * q.
y() + q.
z() * q.
z());
25 complex_t qR = q1 * R;
27 if (std::abs(qR) < 1e-4) {
29 return 4 * M_PI / 3 * pow(R, 3) * (1. - 0.1 * pow(qR, 2));
31 return 4 * M_PI * pow(q1, -3) * (sin(qR) - qR * cos(qR));
T z() const
Returns z-component in cartesian coordinate system.
T y() const
Returns y-component in cartesian coordinate system.
T x() const
Returns x-component in cartesian coordinate system.
complex_t ffSphere(cvector_t q, double R)
Returns the form factor of a sphere of radius R.