Changeset 1130 for cpp/frams/genetics/fB
- Timestamp:
- 04/16/21 15:55:34 (4 years ago)
- Location:
- cpp/frams/genetics/fB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fB/fB_conv.cpp
r973 r1130 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 7 7 #include <frams/param/paramobj.h> 8 8 #include <vector> 9 #include <algorithm> 9 10 #include <frams/util/multimap.h> 10 11 #include "fB_general.h" … … 250 251 double mn, mx, def; 251 252 par.getMinMaxDouble(propindex, mn, mx, def); 252 par.setDouble(propindex, min(mx,max(mn, (mx - mn) * val + mn)));253 par.setDouble(propindex, std::min(mx, std::max(mn, (mx - mn) * val + mn))); 253 254 } 254 255 propindex++; -
cpp/frams/genetics/fB/fB_oper.cpp
r999 r1130 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 5 5 #include <frams/util/sstring.h> 6 6 #include <vector> 7 #include <algorithm> 7 8 #include <frams/param/param.h> 8 9 #include "fB_conv.h" … … 461 462 { 462 463 // get maximal count of genes from both parents 463 int maxgenecount = max(fB_GenoHelpers::geneCountNoNested(parent1),464 int maxgenecount = std::max(fB_GenoHelpers::geneCountNoNested(parent1), 464 465 fB_GenoHelpers::geneCountNoNested(parent2)); 465 466
Note: See TracChangeset
for help on using the changeset viewer.