Use this class to compare two Vector3 objects for equality with NUnit constraints. Call Vector3EqualityComparer.Instance comparer to perform a comparison with the default calculation error value 0.0001f. To specify a different error value, use the one argument constructor to instantiate a new comparer.
Static properties
Syntax
Description
Instance
A comparer instance with the default calculation error value equal to 0.0001f.
Constructors
Syntax
Description
Vector3EqualityComparer(float allowedError)
Creates an instance with a custom error value.
Public methods
Syntax
Description
bool Equals(Vector3 expected, Vector3 actual)
Compares the actual and expectedVector3 objects for equality using Utils.AreFloatsEqual to compare the x, y, and z attributes of Vector3.