MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / create

Method create

Source/Utils/SimplexNoise.cpp:478–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478std::vector<std::vector<float>> SimplexNoise::create(size_t pWidth, size_t pHeight, size_t pOctaves) {
479
480 std::vector<std::vector<float>> result;
481
482 for (float x = 0; x < pWidth; ++x) {
483
484 std::vector<float> row;
485 for (float y = 0; y < pHeight; ++y) {
486
487 row.push_back(fractalXY(pOctaves, x, y));
488 }
489
490 result.push_back(row);
491 }
492
493 normalizeArray(result);
494 return result;
495}
496
497
498void SimplexNoise::normalizeArray(std::vector<std::vector<float>>& pNoise) {

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected