slevy
authored
add general euler-angle functions, euler2t t2euler euler2quat quat2euler meuler2t t2meuler meuler2quat quat2meuler The "meuler" forms take axis-order specs in Maya style, but the angles are accepted/returned always in X,Y,Z order, so meuler2t( "zxy", 17,35,-112 ) = rotZ(-112) * rotX(17) * rotY(35). "zxy" is the same as the virdir axis order. The "euler" forms take axis-order specs in the reverse of Maya style, and expect/return angles in the same order as the axis-order spec, e.g. euler2t( "yxz", 35,17,-112 ) = meuler2t( "zxy", 17,35,-112 ). add stats() Accept a sequence of numbers, and accumulate their mean and variance. ($svar, $N, $mean, $SDev) = &stats(val1, val2, ...) To accumulate more values, pass the first result ($svar) ($svar, $N, $mean, $SDev) = &stats($svar, valN, valN+1, valN+2, ...)