Table of Contents

Class TerrainParity

Namespace
Valheim.Testing
Assembly
Valheim.Testing.dll

Golden parity between two terrain sources: samples both on one lattice over an area and reports where they disagree. Samples sit at MinX + i * step, MinZ + j * step up to and including the area's maximum, so a lattice matching a grid's spacing and origin lands on its nodes. Heights pass within an absolute tolerance in metres. Biomes, when compared, must be equal. River weights, when a tolerance is given, pass within it; river width is not compared. A source that refuses a coordinate fails the comparison with its own exception: choose an area both sources cover. Neither source is treated as correct; the names only say which value is which in the report.

public static class TerrainParity
Inheritance
object
TerrainParity

Fields

MaxSamples

Largest lattice compared in one call.

public const int MaxSamples = 10000000

Field Value

int

Methods

Compare(ITerrain, ITerrain, TerrainArea, float, float, bool, float?, int)

public static TerrainParityReport Compare(ITerrain expected, ITerrain actual, TerrainArea area, float step, float heightTolerance, bool compareBiomes = false, float? riverWeightTolerance = null, int worstCount = 5)

Parameters

expected ITerrain
actual ITerrain
area TerrainArea
step float
heightTolerance float
compareBiomes bool
riverWeightTolerance float?
worstCount int

Returns

TerrainParityReport