Integration of OCCT 6.5.0 from SVN
[occt.git] / src / QANCollection / QANCollection_Common.cxx
CommitLineData
7fd59977 1// File: QANCollection_Common.cxx
2// Created: Tue Apr 30 09:44:26 2002
3// Author: Alexander KARTOMIN (akm)
4// <a-kartomin@opencascade.com>
5//
6// Purpose: To test all methods of all NCollection classes
7
8#include <QANCollection_Common.hxx>
9#include <stdio.h>
10
11void PrintItem(const gp_Pnt& thePnt)
12{
13 printf (" (%5.1f %5.1f %5.1f)\n", thePnt.X(), thePnt.Y(), thePnt.Z());
14}
15
16void PrintItem(const Standard_Real theDbl)
17{
18 printf (" (%5.1f)\n", theDbl);
19}
20
21void Random (Standard_Real& theValue)
22{
23 static Standard_Real dfV=0.14159265358979323846;
24 dfV *= 37.;
25 dfV -= Floor(dfV);
26 theValue = dfV;
27 //theValue=drand48();
28}
29
30void Random (Standard_Integer& theValue,
31 const Standard_Integer theMax)
32{
33 Standard_Real dfR;
34 Random(dfR);
35 theValue = RealToInt(theMax*dfR);
36}
37
38void Random (gp_Pnt& thePnt)
39{
40 // thePnt.SetCoord(drand48(),drand48(),drand48());
41 Standard_Real dfX, dfY, dfZ;
42 Random(dfX);
43 Random(dfY);
44 Random(dfZ);
45 thePnt.SetCoord(dfX,dfY,dfZ);
46}