An extension method for Assert.AreNotApproximatelyEqual.
#pragma strict public class AssertionExampleClass extends MonoBehaviour { var rigidbody: Rigidbody; function Update() { //Unless specified, default error tolerance will be used. rigidbody.velocity.magnitude.MustNotBeApproximatelyEqual(0.0f); } }
public class AssertionExampleClass : MonoBehaviour { Rigidbody rigidbody; void Update () { //Make sure the rigidbody never stops. //AreNotApproximatelyEqual should be used for comparing floating point variables. //Unless specified, default error tolerance will be used. rigidbody.velocity.magnitude.MustNotBeApproximatelyEqual(0.0f); } }