Changeset 3a48772 in sasmodels for sasmodels/models/capped_cylinder.c


Ignore:
Timestamp:
Oct 14, 2016 3:23:40 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
a5b6997
Parents:
b716cc6
Message:

use predefined constants for fractions of pi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/capped_cylinder.c

    r5bddd89 r3a48772  
    4545    // translate dx in [-1,1] to dx in [lower,upper] 
    4646    const double integral = total*zm; 
    47     const double cap_Fq = 2*M_PI*cube(radius_cap)*integral; 
     47    const double cap_Fq = 2.0*M_PI*cube(radius_cap)*integral; 
    4848    return cap_Fq; 
    4949} 
     
    5656    const double bj = sas_J1c(q*radius*sin_alpha); 
    5757    const double si = sinc(q*half_length*cos_alpha); 
    58     const double cyl_Fq = 2.*M_PI*radius*radius*half_length*bj*si; 
     58    const double cyl_Fq = 2.0*M_PI*radius*radius*half_length*bj*si; 
    5959    const double Aq = cap_Fq + cyl_Fq; 
    6060    return Aq; 
Note: See TracChangeset for help on using the changeset viewer.