inline void Select_RotateAxis (int axis, float deg) { if (fabs(deg) == 90.f) { GlobalSelectionSystem().rotateSelected(quaternion_for_axis90((axis_t) axis, (deg > 0) ? eSignPositive : eSignNegative)); } else { switch (axis) { case 0: GlobalSelectionSystem().rotateSelected(quaternion_for_matrix4_rotation(matrix4_rotation_for_x_degrees(deg))); break; case 1: GlobalSelectionSystem().rotateSelected(quaternion_for_matrix4_rotation(matrix4_rotation_for_y_degrees(deg))); break; case 2: GlobalSelectionSystem().rotateSelected(quaternion_for_matrix4_rotation(matrix4_rotation_for_z_degrees(deg))); break; } } }
TestAll() { Vector3 result1 = TestBinaryFunction<Vector3, Vector3, Vector3>(testAdded1).run(Vector3(0, 0, 0), Vector3(1, 1, 1)); Vector3 result2 = TestBinaryFunction<Vector3, Vector3, Vector3>(testAdded2).run(Vector3(0, 0, 0), Vector3(1, 1, 1)); Vector3 result3 = TestBinaryFunction<Vector3, Vector3, Vector3>(testMultiplied1).run(Vector3(1, 2, 3), Vector3(2, 1, 0.5f)); Vector3 result4 = TestBinaryFunction<Vector3, Vector3, Vector3>(testMultiplied2).run(Vector3(1, 2, 3), Vector3(2, 1, 0.5f)); Vector3 result5 = TestBinaryFunction<Vector3, Vector3, double>(testScaled1).run(Vector3(1, 2, 3), 2.0); Vector3 result6 = TestBinaryFunction<Vector3, Vector3, double>(testScaled2).run(Vector3(1, 2, 3), 2.0); Vector3 result7 = TestBinaryFunction<Vector3, Vector3, Matrix4>(testMatrixMultiplied1).run(Vector3(1, 2, 3), matrix4_rotation_for_x_degrees(90)); Vector3 result8 = TestBinaryFunction<Vector3, Vector3, Matrix4>(testMatrixMultiplied2).run(Vector3(1, 2, 3), matrix4_rotation_for_x_degrees(90)); Vector3 result9 = TestUnaryFunction<Vector3, Vector3>(testNormalised1).run(Vector3(1, 2, 3)); Vector3 result10 = TestUnaryFunction<Vector3, Vector3>(testNormalised2).run(Vector3(1, 2, 3)); }