public void ToDenseVector() { var uv = UnitVector3D.Create(0.2672612419124244, -0.53452248382484879, 0.80178372573727319); var vector = uv.ToVector(); Assert.AreEqual(3, vector.Count); Assert.AreEqual(0.2672612419124244, vector[0]); Assert.AreEqual(-0.53452248382484879, vector[1]); Assert.AreEqual(0.80178372573727319, vector[2]); var roundtripped = UnitVector3D.OfVector(vector); Assert.AreEqual(0.2672612419124244, roundtripped.X); Assert.AreEqual(-0.53452248382484879, roundtripped.Y); Assert.AreEqual(0.80178372573727319, roundtripped.Z); }
public UnitVector3D OfVector() { return(UnitVector3D.OfVector(Vector)); }