Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 18, 2005, 4:45:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reimplemented the random funtions to behave between boundrarties

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/animation/t_animation.h

    r3872 r3874  
    342342float tAnimation<T>::random(float timePassed) const
    343343{
    344   return this->currentKeyFrame->value * (float)rand()/(float)RAND_MAX;
     344  return this->currentKeyFrame->value +
     345    (this->nextKeyFrame->value - this->currentKeyFrame->value) *
     346    (float)rand()/(float)RAND_MAX;
    345347}
    346348
Note: See TracChangeset for help on using the changeset viewer.