public static Quaternion CombineRotations(params Quaternion[] rotations) { Assure.NotNull(rotations); Assure.GreaterThan(rotations.Length, 0, "Can not supply an empty array to combine rotations."); Quaternion result = rotations[0]; for (int i = 1; i < rotations.Length; i++) { result *= rotations[i]; } return(result); }
public void TestGreaterThan() { // Define variables and constants const int THREE = 3; const int FOUR = 4; // Set up context // Execute Assure.GreaterThan(FOUR, THREE); try { Assure.GreaterThan(THREE, FOUR); Assert.Fail(); } catch (AssuranceFailedException) { } // Assert outcome }