Ignore:
Timestamp:
11/30/19 01:30:22 (5 years ago)
Author:
Maciej Komosinski
Message:

Replaced #defined macros for popular random-related operations with functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/_demos/genomanipulation.cpp

    r742 r896  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2019  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    4747        printf("      Current value of '%s' (%s) is '%s'\n", pi.id(i), pi.name(i), pi.get(i).c_str());
    4848        char t[100];
    49         sprintf(t, "%g", minprop + (rnd01)*(maxprop - minprop));
     49        sprintf(t, "%g", minprop + rndDouble(maxprop - minprop));
    5050        printf("      Setting new value... [ using ParamInterface::set() ]\n");
    5151        pi.setFromString(i, t);
Note: See TracChangeset for help on using the changeset viewer.