./
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
9 / 9
100.0%
Branches:
5 / 5
100.0%
Functions:
1 / 1
100.0%

src/distribution/synthterrain.cpp
Line Branch Exec Source
1 // SPDX-License-Identifier: BSD-3-Clause
2
3 #include "terraingen/distribution/synthterrain.h"
4
5 #include <stdexcept>
6
7 namespace terraingen {
8
9 13 PowerLawSfd SynthterrainBoulderDistribution(SynthterrainBoulders boulders) {
10
4/4
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 6 times.
✓ Branch 2 taken 3 times.
✓ Branch 3 taken 1 time.
13 switch (boulders) {
11 3 case SynthterrainBoulders::InterCrater:
12 3 return PowerLawSfd(0.0001, 1.75457);
13 6 case SynthterrainBoulders::Haworth:
14 6 return PowerLawSfd(0.002, 2.6607);
15 3 case SynthterrainBoulders::ViperSpecification:
16 3 return PowerLawSfd(0.0003, 2.482);
17 }
18
1/1
✓ Branch 2 taken 1 time.
1 throw std::invalid_argument("Unknown synthterrain boulder distribution");
19 }
20
21 } // namespace terraingen
22