.. | .. |
---|
88 | 88 | |
---|
89 | 89 | static void vecCopy(cVector a, cVector b) |
---|
90 | 90 | { |
---|
| 91 | + Grafreed.Assert (a != null); |
---|
| 92 | + assert (b != null); |
---|
| 93 | + |
---|
91 | 94 | b.x = a.x; |
---|
92 | 95 | b.y = a.y; |
---|
93 | 96 | b.z = a.z; |
---|
.. | .. |
---|
307 | 310 | |
---|
308 | 311 | } |
---|
309 | 312 | |
---|
310 | | - GrafreeD.Assert(Math.abs(src[0][3]) <= 1E-15); |
---|
311 | | - GrafreeD.Assert(Math.abs(src[1][3]) <= 1E-15); |
---|
312 | | - GrafreeD.Assert(Math.abs(src[2][3]) <= 1E-15); |
---|
313 | | - GrafreeD.Assert(Math.abs(src[3][3] - 1) <= 1E-15); |
---|
314 | | - GrafreeD.Assert(Math.abs(dst[0][3]) <= 1E-15); |
---|
315 | | - GrafreeD.Assert(Math.abs(dst[1][3]) <= 1E-15); |
---|
316 | | - GrafreeD.Assert(Math.abs(dst[2][3]) <= 1E-15); |
---|
317 | | - GrafreeD.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); |
---|
| 313 | + // Last row should always be 0 0 0 1 |
---|
| 314 | + Grafreed.Assert(Math.abs(src[0][3]) <= 1E-15); |
---|
| 315 | + Grafreed.Assert(Math.abs(src[1][3]) <= 1E-15); |
---|
| 316 | + Grafreed.Assert(Math.abs(src[2][3]) <= 1E-15); |
---|
| 317 | + Grafreed.Assert(Math.abs(src[3][3] - 1) <= 1E-15); |
---|
| 318 | + Grafreed.Assert(Math.abs(dst[0][3]) <= 1E-15); |
---|
| 319 | + Grafreed.Assert(Math.abs(dst[1][3]) <= 1E-15); |
---|
| 320 | + Grafreed.Assert(Math.abs(dst[2][3]) <= 1E-15); |
---|
| 321 | + Grafreed.Assert(Math.abs(dst[3][3] - 1) <= 1E-15); |
---|
318 | 322 | } |
---|
319 | 323 | |
---|
320 | 324 | static double toRadians(double degrees) |
---|