Changeset deac08c in sasmodels for sasmodels/kernel_template.c


Ignore:
Timestamp:
Feb 26, 2016 4:42:27 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
e7678b2
Parents:
a8bd500
Message:

add square(), cube() and M_4PI_3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_template.c

    r960cd80 rdeac08c  
    6767#  define pown(a,b) pow(a,b) 
    6868#else 
    69 #  ifdef USE_SINCOS 
     69#  if defined(USE_SINCOS) 
    7070#    define SINCOS(angle,svar,cvar) svar=sincos(angle,&cvar) 
    7171#  else 
     
    8989#endif 
    9090 
    91 // Non-standard pi/180, used for converting between degrees and radians 
     91// Non-standard function library 
     92// pi/180, used for converting between degrees and radians 
     93// 4/3 pi for computing sphere volumes 
     94// square and cube for computing squares and cubes 
    9295#ifndef M_PI_180 
    9396#  define M_PI_180 0.017453292519943295 
    9497#endif 
     98#ifndef M_4PI_3 
     99#  define M_4PI_3 4.18879020478639 
     100#endif 
     101inline double square(double x) { return pow(x,2.0); } 
     102//inline double square(double x) { return pown(x,2); } 
     103//inline double square(x) { return x*x; } 
     104inline double cube(double x) { return x*x*x; } 
    95105 
    96106 
Note: See TracChangeset for help on using the changeset viewer.