Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 18, 2010, 9:46:16 PM (15 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/libraries/util/Math.cc

    r6417 r7184  
    185185        float distancelength = distance.length();
    186186        if (distancelength == 0) return orxonox::Vector2(0, 0);
    187         float radius = acos(clamp<float>(mydirection.dotProduct(distance) / distancelength, -1, 1)) / Ogre::Math::PI;
     187        float radius = acos(clamp<float>(mydirection.dotProduct(distance) / distancelength, -1, 1)) / math::pi;
    188188
    189189        if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0)
Note: See TracChangeset for help on using the changeset viewer.