Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 18, 2010, 9:46:16 PM (14 years ago)
Author:
rgrieder
Message:

Replaced mathematical constants with a common definition in Math.h.
Use math::pi, math::pi_d (double), math::e, etc. from now on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/designtools/CreateStars.cc

    r7163 r7184  
    3838{
    3939    CreateFactory(CreateStars);
    40 
    41     static const float pi = 3.14159265359f;
    4240
    4341    CreateStars::CreateStars(BaseObject* creator) : BaseObject(creator)
     
    9088            while(1)
    9189            {
    92                 phi = rnd(2*pi);
    93                 teta = rnd(pi);
     90                phi = rnd(2*math::pi);
     91                teta = rnd(math::pi);
    9492                float random = rnd(1);
    9593                if(sin(teta)>random) break;
Note: See TracChangeset for help on using the changeset viewer.