46 {
47
48
49
51 const Vec3 ConstV3(1.,2.,3.);
52
53 V3[0] = ConstV3[0];
54 V3[1] = ConstV3[1];
55 V3[2] = ConstV3[2];
56 assert(V3 == ConstV3);
57
58 V3(0) = ConstV3(2);
59 V3(1) = ConstV3(1);
60 V3(2) = ConstV3(0);
62
63
64
66 const Vec4 ConstV4(1.,2.,3.,4);
67
68 V4[0] = ConstV4[0];
69 V4[1] = ConstV4[1];
70 V4[2] = ConstV4[2];
71 V4[3] = ConstV4[3];
72 assert(V4 == ConstV4);
73
74 V4(0) = ConstV4(3);
75 V4(1) = ConstV4(2);
76 V4(2) = ConstV4(1);
77 V4(3) = ConstV4(0);
79
80
81
82 int i, j, k;
84
86
87 k = 1;
88 for(i=0; i<3; i++) {
89 for(j=0; j<3; j++) {
90 assert(R3(i,j) == double(k));
91 assert(R3[i][j] == double(k));
92 k++;
93 }
94 }
95
96
97
99 R4.
setMatrix(1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.);
100
101 k = 1;
102 for(i=0; i<4; i++) {
103 for(j=0; j<4; j++) {
104 assert(R4(i,j) == double(k));
105 assert(R4[i][j] == double(k));
106 k++;
107 }
108 }
109
110 return 0;
111}
void setMatrix(double xx1, double xy1, double xz1, double yx1, double yy1, double yz1, double zx1, double zy1, double zz1)
void setMatrix(double xx1, double xy1, double xz1, double xt1, double yx1, double yy1, double yz1, double yt1, double zx1, double zy1, double zz1, double zt1, double tx1, double ty1, double tz1, double tt1)