- Timestamp:
- Nov 28, 2015, 10:30:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/CommonController.cc
r10877 r10885 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Gani Aliguzhinov 24 24 * Co-authors: 25 25 * Dominik Solenicki … … 52 52 float CommonController::randomInRange( float a, float b ) 53 53 { 54 float random = rnd( 1.0f ); 55 float diff = b - a; 56 float r = random * diff; 57 return a + r; 54 return a + rnd(1.0f) * (b - a); 58 55 } 59 56 float CommonController::distance (ControllableEntity* entity1, ControllableEntity* entity2) … … 193 190 return name; 194 191 } 195 196 197 192 }
Note: See TracChangeset
for help on using the changeset viewer.