-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.cpp
More file actions
28 lines (25 loc) · 685 Bytes
/
test.cpp
File metadata and controls
28 lines (25 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Created by chais on 28.07.15.
//
#include <iostream>
#include "lib/sampler/random_sampler.h"
using namespace std;
int main(int argc, char *argv[]) {
cout << "1D float" << endl;
for (unsigned long i = 0; i < 300000; i++) {
random_sampler s;
cout << s.get_1d_samples(0.0f, 1.0f, 1)->at(0) << ' ';
}
cout << endl << "1D long" << endl;
for (unsigned long i = 0; i < 300000; i++) {
random_sampler s;
cout << s.get_1d_samples(0l, 1000l, 1)->at(0) << ' ';
}
cout << endl << "2D float" << endl;
for (unsigned long i = 0; i < 300000; i++) {
random_sampler s;
vec2 v = s.get_2d_samples(0, 1, 0, 1, 1)->at(0);
cout << v[0] << ' ' << v[1] << ';';
}
cout << endl;
}