BoundingBox IsNearlyEqual Method Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public bool IsNearlyEqual(
	BoundingBox other
)

Return Value

Type: Boolean
Remarks

Tests: DeltaEngine.Tests.Datatypes.BoundingBoxTests
Examples

1 unit tests call DeltaEngine.Datatypes.BoundingBox.IsNearlyEqual(DeltaEngine.Datatypes.BoundingBox)
[Test]
public void CheckForNearlyEqual()
{
    var boxMaximum = Vector3D.One;
    var box = new BoundingBox(Vector3D.Zero, boxMaximum);
    const float AllowedValueEpsilon = MathExtensions.Epsilon * 0.999f;
    boxMaximum += new Vector3D(AllowedValueEpsilon, AllowedValueEpsilon, AllowedValueEpsilon);
    var otherBox = new BoundingBox(Vector3D.Zero, boxMaximum);
    Assert.IsTrue(box.IsNearlyEqual(otherBox));
}
See Also