Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 31, 2009, 1:15:52 AM (15 years ago)
Author:
landauf
Message:

some small adjustments in PongAI and related classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/util/Math.h

    r2756 r2872  
    270270    }
    271271
     272    /**
     273        @brief Returns randomly 1 or -1 with equal probability.
     274    */
     275    inline float rndsgn()
     276    {
     277        return ((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0
     278    }
     279
    272280    _UtilExport unsigned long getUniqueNumber();
    273281
Note: See TracChangeset for help on using the changeset viewer.