//-------------------------------------- 5 sec - method Quaternion.addQ(double[], double[]) //-------------------------------------- 5 sec - postprocessing... public static double[] addQ (final double[] a_139, final double[] b_140) { final double[] c_141 = new double[4]; final double re_254 = a_139[1] + b_140[1]; final double im_255 = a_139[2] + b_140[2]; final double im_265 = a_139[3] + b_140[3]; c_141[0] = a_139[0] + b_140[0]; c_141[1] = re_254; c_141[2] = im_255; c_141[3] = im_265; return c_141; } //-------------------------------------- 6 sec - JScp version 0.0.76 //-------------------------------------- 5 sec - method Quaternion.subQ(double[], double[]) //-------------------------------------- 5 sec - postprocessing... public static double[] subQ (final double[] a_139, final double[] b_140) { final double[] c_141 = new double[4]; final double re_254 = a_139[1] - b_140[1]; final double im_255 = a_139[2] - b_140[2]; final double im_265 = a_139[3] - b_140[3]; c_141[0] = a_139[0] - b_140[0]; c_141[1] = re_254; c_141[2] = im_255; c_141[3] = im_265; return c_141; } //-------------------------------------- 6 sec - JScp version 0.0.76 //-------------------------------------- 5 sec - method Quaternion.mulQ(double[], double[]) //-------------------------------------- 5 sec - postprocessing... public static double[] mulQ (final double[] a_139, final double[] b_140) { final double[] c_141 = new double[4]; final double a_0_151 = a_139[0]; final double a_3_152 = a_139[3]; final double a_1_156 = a_139[1]; final double a_2_157 = a_139[2]; final double b_0_161 = b_140[0]; final double b_3_162 = b_140[3]; final double b_1_166 = b_140[1]; final double b_2_167 = b_140[2]; final double im_187 = -b_3_162; final double re_192 = -b_1_166; final double im_198 = -(-b_2_167); final double re_364 = a_1_156 * b_0_161 - a_2_157 * im_187 + (a_0_151 * b_1_166 - a_3_152 * b_2_167); final double im_365 = a_1_156 * im_187 + a_2_157 * b_0_161 + (a_0_151 * b_2_167 + a_3_152 * b_1_166); final double im_414 = a_1_156 * im_198 + a_2_157 * re_192 + (a_0_151 * b_3_162 + a_3_152 * b_0_161); c_141[0] = a_1_156 * re_192 - a_2_157 * im_198 + (a_0_151 * b_0_161 - a_3_152 * b_3_162); c_141[1] = re_364; c_141[2] = im_365; c_141[3] = im_414; return c_141; } //-------------------------------------- 6 sec - JScp version 0.0.76