aboutsummaryrefslogtreecommitdiff
path: root/src/sampling/random.cpp
blob: d77e78a51c4e1c7ced27257f381f818ef6fbb28d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "random.hpp"

RandomSampler::RandomSampler(long samples, int seed)
    : Sampler(samples), m_rng(seed) {}

double RandomSampler::getSample() {
    return m_rng.getDouble();
}

Vec2d RandomSampler::get2dSample() {
    return Vec2d(m_rng.getDouble(), m_rng.getDouble());
}