Danny Arends:

Another post: http://www.dannyarends.nl/?viewDetailed=00030

pure mat!(T)[3][] gen_rotationmatrices(T = float)(){

I suggest to write something like this (note the casing and other details):

Mat!T[3][] genRotationMatrices(T = float)() pure {



tmp += mixin('A[i][k] '~op~' B[k][j]');

This seems OK, but it looks a bit convoluted. Maybe something like this works (untested):

tmp += A[i][k].opBinary!op(B[k][j]);



pure auto yaw(int deg){
   deg = degreeloop(deg);
   return cast(matrix)rmatrix[deg][YAW];
}

I suggest generally to try to avoid casts, where possible.

Bye,
bearophile

Reply via email to