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

Method meanOfSquare

Source/Utils/diamondsquare.hpp:366–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364 }
365
366 double meanOfSquare(
367 const uint x,
368 const uint y,
369 const uint halfStepLength,
370 const std::vector<std::vector<double> >&R) {
371
372 return 0.25*(
373 R[x + halfStepLength][y + halfStepLength] +
374 R[x + halfStepLength][y - halfStepLength] +
375 R[x - halfStepLength][y + halfStepLength] +
376 R[x - halfStepLength][y - halfStepLength]);
377 }
378
379 double meanOfDiamond(
380 const uint x,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected