Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
13b889d3
Commit
13b889d3
authored
Apr 21, 2004
by
Andreas Pfeiffer
Browse files
added -b for diff to ignore whitespace, removed ambiguities for VC71
parent
c517f5f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Geometry/test/testBasicVector3D.cc
View file @
13b889d3
// -*- C++ -*-
// $Id: testBasicVector3D.cc,v 1.
3
200
3/10/24 21:39:45 garren
Exp $
// $Id: testBasicVector3D.cc,v 1.
4
200
4/04/21 12:51:26 pfeiffer
Exp $
// ---------------------------------------------------------------------------
#include <iostream>
...
...
@@ -115,12 +115,12 @@ using namespace HepGeom;
assert(p50.r() == 7); \
assert(p50.getR() == 7); \
point p51(0,0,1); assert(p51.phi() == 0); \
point p52(2,4,5); assert(EQUAL(p52.phi() ,atan2(2,1))); \
assert(EQUAL(p52.getPhi() ,atan2(2,1))); \
point p52(2,4,5); assert(EQUAL(p52.phi() ,atan2(2
.
,1
.
))); \
assert(EQUAL(p52.getPhi() ,atan2(2
.
,1
.
))); \
point p53(0,0,0); assert(p53.theta() == 0); \
assert(p53.cosTheta() == 1); \
point p54(3,4,10); assert(EQUAL(p54.theta() ,atan2(1,2))); \
assert(EQUAL(p54.getTheta(),atan2(1,2))); \
point p54(3,4,10); assert(EQUAL(p54.theta() ,atan2(1
.
,2
.
))); \
assert(EQUAL(p54.getTheta(),atan2(1
.
,2
.
))); \
assert(EQUAL(p54.cosTheta(),sqrt(0.8))); \
point p55(2,3,6); \
p55.setMag(14); assert(p55 == point(4,6,12)); \
...
...
@@ -159,31 +159,31 @@ using namespace HepGeom;
point p82 = p80.orthogonal(); assert(EQUAL(p82.dot(p81),0)); \
\
/* Check rotations */
\
point p90(2,0.5,sqrt(3)/2); \
point p90(2,0.5,sqrt(3
.
)/2); \
p90.rotateX(CLHEP::pi/6); assert(p90.x() == 2); \
assert(EQUAL(p90.y(),0)); \
assert(EQUAL(p90.z(),1)); \
point p91(sqrt(3)/2,2,0.5); \
point p91(sqrt(3
.
)/2,2,0.5); \
p91.rotateY(CLHEP::pi/6); assert(EQUAL(p91.x(),1)); \
assert(p91.y() == 2); \
assert(EQUAL(p91.z(),0)); \
point p92(0.5,sqrt(3)/2,2); \
point p92(0.5,sqrt(3
.
)/2,2); \
p92.rotateZ(CLHEP::pi/6); assert(EQUAL(p92.x(),0)); \
assert(EQUAL(p92.y(),1)); \
assert(p92.z() == 2); \
point p93(1,1,sqrt(2)); \
p93.rotate(CLHEP::pi,Vector3D<float>(-1,-1,sqrt(2))); \
point p93(1,1,sqrt(2
.
)); \
p93.rotate(CLHEP::pi,Vector3D<float>(-1,-1,sqrt(2
.
))); \
assert(EQUAL(p93.x(),-1)); \
assert(EQUAL(p93.y(),-1)); \
assert(EQUAL(p93.z(),-sqrt(2))); \
assert(EQUAL(p93.z(),-sqrt(2
.
))); \
\
/* Check transformations */
\
point p100(1,1,sqrt(2)); \
point p100(1,1,sqrt(2
.
)); \
Transform3D m; \
m = Rotate3D(CLHEP::pi,Vector3D<float>(-1,-1,sqrt(2))); \
m = Rotate3D(CLHEP::pi,Vector3D<float>(-1,-1,sqrt(2
.
))); \
p100.transform(m); assert(EQUAL(p100.x(),-1)); \
assert(EQUAL(p100.y(),-1)); \
assert(EQUAL(p100.z(),-sqrt(2))); \
assert(EQUAL(p100.z(),-sqrt(2
.
))); \
\
/* Check input/output */
\
point p110; \
...
...
Geometry/test/testBasicVector3D.sh.in
View file @
13b889d3
...
...
@@ -3,4 +3,4 @@
./testBasicVector3D@EXEEXT@ < @srcdir@/testBasicVector3D.input
\
| diff
-q
- @srcdir@/testBasicVector3D.output
>
/dev/null
| diff
-b
-q
- @srcdir@/testBasicVector3D.output
>
/dev/null
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment