Optimized static Euler method

I did this optimization in the interest of better understanding how to
go about implementing eulerAngles(). It helped a lot.