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/hollow_rectangular_prism.c

    r87bc707 r3a48772  
    3434   //Integration limits to use in Gaussian quadrature 
    3535    double v1a = 0.0; 
    36     double v1b = 0.5 * M_PI;  //theta integration limits 
     36    double v1b = M_PI_2;  //theta integration limits 
    3737    double v2a = 0.0; 
    38     double v2b = 0.5 * M_PI;  //phi integration limits 
     38    double v2b = M_PI_2;  //phi integration limits 
    3939     
    4040    //Order of integration 
     
    8888    // Normalize as in Eqn. (15) without the volume factor (as cancels with (V*DelRho)^2 normalization) 
    8989    // The factor 2 is due to the different theta integration limit (pi/2 instead of pi) 
    90     answer *= (2.0/M_PI); 
     90    answer /= M_PI_2; 
    9191 
    9292    // Multiply by contrast^2. Factor corresponding to volume^2 cancels with previous normalization. 
Note: See TracChangeset for help on using the changeset viewer.