Subversion Repositories gelsvn

Rev

Rev 193 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 193 Rev 417
Line 7... Line 7...
7
 
7
 
8
using namespace std;
8
using namespace std;
9
using namespace CGLA;
9
using namespace CGLA;
10
 
10
 
11
 
11
 
12
float frand() { return static_cast<float>(rand())/RAND_MAX - 0.5f;}
12
float frand() { return static_cast<float>(gel_rand())/GEL_RAND_MAX - 0.5f;}
13
 
13
 
14
/* This is a non-exhaustive test program for CGLA */
14
/* This is a non-exhaustive test program for CGLA */
15
int main()
15
int main()
16
{
16
{
17
    Vec3f norm(1,0,0);
17
    Vec3f norm(1,0,0);
Line 22... Line 22...
22
    
22
    
23
    cout << "The frame " << endl;
23
    cout << "The frame " << endl;
24
    cout << norm << a << b << endl;
24
    cout << norm << a << b << endl;
25
    
25
    
26
    vector<Vec3f> vec;
26
    vector<Vec3f> vec;
27
    srand(0);
27
    gel_srand(0);
28
    for(int i=0;i<100000;++i)
28
    for(int i=0;i<100000;++i)
29
    {
29
    {
30
	Vec3f p = 1.0f*frand()*norm + 2.02f*frand()*a + 3.05f*frand()*b;
30
	Vec3f p = 1.0f*frand()*norm + 2.02f*frand()*a + 3.05f*frand()*b;
31
	vec.push_back(p);
31
	vec.push_back(p);
32
    }
32
    }