Changeset 8103:84dd307db8a3 in orange


Ignore:
Timestamp:
07/19/11 12:36:43 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
74025a1c08871b2f4ceaaaa1e852f1c7499738b9
Message:

Fixed randomFloat() methods (fixes #861).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/distvars.cpp

    r7665 r8103  
    12621262  float ri = randomGenerator->randfloat(abs); 
    12631263  const_iterator di(begin()); 
    1264   while (ri > (*di).first) 
    1265     ri -= (*(di++)).first; 
    1266   return (*di).second; 
     1264  while (ri > (*di).second) 
     1265    ri -= (*(di++)).second; 
     1266  return (*di).first; 
    12671267} 
    12681268 
     
    12721272  float ri = (random & 0x7fffffff) / float(0x7fffffff); 
    12731273  const_iterator di(begin()); 
    1274   while (ri > (*di).first) 
    1275     ri -= (*(di++)).first; 
    1276   return (*di).second; 
     1274  while (ri > (*di).second) 
     1275    ri -= (*(di++)).second; 
     1276  return (*di).first; 
    12771277} 
    12781278 
Note: See TracChangeset for help on using the changeset viewer.