Changeset 896 for cpp/frams/genetics/fF


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/genetics/fF/fF_oper.cpp

    r779 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
    55#include "fF_oper.h"
    66#include "fF_genotype.h"
    7 #include <common/nonstd.h> //randomN, rnd01
     7#include <common/nonstd.h> //rndUint, rnd01
    88
    99
     
    4949        par.load(gene);
    5050        static const int propsToMutate[] = fF_PROPS_TO_MUTATE;
    51         int which = randomN(ARRAY_LENGTH(propsToMutate));
     51        int which = rndUint(ARRAY_LENGTH(propsToMutate));
    5252        bool mutated_ok = GenoOperators::mutatePropertyNaive(par.param, propsToMutate[which]);
    5353        if (mutated_ok)
Note: See TracChangeset for help on using the changeset viewer.