RayTests CanConvertToStringAndBack Method Delta Engine Documentation

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

public void CanConvertToStringAndBack()
Examples

[Test]
public void CanConvertToStringAndBack()
{
    var ray = new Ray(Vector3D.UnitX, Vector3D.UnitY);
    var stringRay = ray.ToString();
    Assert.AreEqual("Ray({1, 0, 0},{0, 1, 0})", stringRay);
    var retrievedRay = new Ray(stringRay);
    Assert.AreEqual(ray.Origin, retrievedRay.Origin);
    Assert.AreEqual(ray.Direction, retrievedRay.Direction);
}
See Also