MCPcopy Create free account
hub / github.com/chrxh/alien / randomizeAges

Method randomizeAges

source/EngineInterface/DescriptionEditService.cpp:468–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void DescriptionEditService::randomizeAges(ClusteredDataDescription& data, int minAge, int maxAge)
469{
470 for (auto& cluster : data.clusters) {
471 auto age = NumberGenerator::get().getRandomReal(toDouble(minAge), toDouble(maxAge));
472 for (auto& cell : cluster.cells) {
473 cell.age = age;
474 }
475 }
476}
477
478void DescriptionEditService::randomizeCountdowns(ClusteredDataDescription& data, int minValue, int maxValue)
479{

Callers 1

onExecuteMethod · 0.80

Calls 2

toDoubleFunction · 0.85
getRandomRealMethod · 0.80

Tested by

no test coverage detected