Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] CGAL::Random

Subject: CGAL users discussion list

List archive

[cgal-discuss] CGAL::Random


Chronological Thread 
  • From: sara123 <>
  • To:
  • Subject: [cgal-discuss] CGAL::Random
  • Date: Tue, 21 Jun 2011 14:54:37 -0700 (PDT)

Hi, i wrote this simple code and executed it under a cpp file:

for (int t=1; t<4; t++)
{
CGAL::Random random;
double randi=random.get_double (0.0, 1);
double mandi=random.get_double (0.0, 1);
std::cout<<"randi="<<randi<<std::endl;
std::cout<<"mandi="<<mandi<<std::endl;
}

after executation i received the same answer for randi and mandi in four
execution of for loop:

randi=0.969421
mandi=0.659637
randi=0.969421
mandi=0.659637
randi=0.969421
mandi=0.659637

now i want to receive different answers for each of variables in each of
executation of for loop?

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-Random-tp3615460p3615460.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.16.

Top of Page