/// Use this class to compare two Vector4 objects for equality with NUnit constraints. Call Vector4EqualityComparer.Instance to perform comparisons using default calculation error value 0.0001f. To set a custom test value, instantiate a new comparer using the one argument constructor.
/// <param name="allowedError">This value identifies the calculation error allowed.</param>
publicVector4EqualityComparer(floatallowedError)
{
this.AllowedError=allowedError;
}
/// <summary>
/// Compares the actual and expected Vector4 objects for equality using <see cref="Utils.AreFloatsEqual"/> to compare the x, y, z, and w attributes of Vector4.
/// </summary>
/// <param name="expected">The expected Vector4 used for comparison</param>
/// <param name="actual">The actual Vector4 to test</param>
/// <returns>True if the vectors are equals, false otherwise.</returns>
/// <example>
/// <code>
///[TestFixture]
/// public class Vector4Test
/// {
/// [Test]
/// public void VerifyThat_TwoVector4ObjectsAreEqual()
/// {
/// // Custom error 10e-6f
/// var actual = new Vector4(0, 0, 1e-6f, 1e-6f);
/// var expected = new Vector4(1e-6f, 0f, 0f, 0f);
/// var comparer = new Vector4EqualityComparer(10e-6f);