public void TestEquals() { Vector3B a = new Vector3B(false, true, false); Vector3B b = new Vector3B(true, false, true); Vector3B c = new Vector3B(false, true, false); Assert.IsTrue(a.Equals(c)); Assert.IsTrue(c.Equals(a)); Assert.IsTrue(a == c); Assert.IsTrue(c == a); Assert.IsFalse(c != a); Assert.IsFalse(c != a); Assert.IsFalse(a.Equals(b)); Assert.IsFalse(b.Equals(a)); Assert.IsFalse(a == b); Assert.IsFalse(b == a); Assert.IsTrue(a != b); Assert.IsTrue(b != a); object objA = a; object objB = b; object objC = c; Assert.IsTrue(a.Equals(objA)); Assert.IsTrue(a.Equals(objC)); Assert.IsFalse(a.Equals(objB)); Assert.IsTrue(objA.Equals(objC)); Assert.IsFalse(objA.Equals(objB)); Assert.IsFalse(a.Equals(null)); Assert.IsFalse(a.Equals(5)); }
public Vector4B(Vector3B v, bool w) { _x = v.X; _y = v.Y; _z = v.Z; _w = w; }
public void Construct1() { Vector3B v = new Vector3B(new Vector2B(false, true), false); Assert.IsFalse(v.X); Assert.IsTrue(v.Y); Assert.IsFalse(v.Z); }
public void XY() { Vector3B a = new Vector3B(false, true, false); Vector2B xy = a.XY; Assert.IsFalse(xy.X); Assert.IsTrue(xy.Y); }
public void TestGetHashCode() { Vector3B a = new Vector3B(false, true, false); Vector3B b = new Vector3B(true, false, true); Vector3B c = new Vector3B(false, true, false); Assert.AreEqual(a.GetHashCode(), c.GetHashCode()); Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode()); }
public void ToVector3I() { Vector3B a = new Vector3B(false, true, false); Vector3I sA = a.ToVector3I(); Assert.AreEqual(0, sA.X); Assert.AreEqual(1, sA.Y); Assert.AreEqual(0, sA.Z); }
public void ToVector3H() { Vector3B a = new Vector3B(false, true, false); Vector3H sA = a.ToVector3H(); Assert.AreEqual((Half)0, sA.X); Assert.AreEqual((Half)1, sA.Y); Assert.AreEqual((Half)0, sA.Z); }
public void ToVector3F() { Vector3B a = new Vector3B(false, true, false); Vector3F sA = a.ToVector3F(); Assert.AreEqual(0.0f, sA.X); Assert.AreEqual(1.0f, sA.Y); Assert.AreEqual(0.0f, sA.Z); }
public void ToVector3B() { Vector3D a = new Vector3D(0.0, 1.0, 0.0); Vector3B sA = a.ToVector3B(); Assert.IsFalse(sA.X); Assert.IsTrue(sA.Y); Assert.IsFalse(sA.Z); }
public void ToVector3B() { Vector3F a = new Vector3F(0.0f, 1.0f, 0.0f); Vector3B bA = a.ToVector3B(); Assert.IsFalse(bA.X); Assert.IsTrue(bA.Y); Assert.IsFalse(bA.Z); }
public void ToVector3B() { Vector3H a = new Vector3H(0, 1, 0); Vector3B sA = a.ToVector3B(); Assert.IsFalse(sA.X); Assert.IsTrue(sA.Y); Assert.IsFalse(sA.Z); }
public void XYZ() { Vector4B a = new Vector4B(false, true, false, true); Vector3B xyz = a.XYZ; Assert.IsFalse(xyz.X); Assert.IsTrue(xyz.Y); Assert.IsFalse(xyz.Z); }
public void TestToString() { CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture; try { Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR"); Vector3B a = new Vector3B(false, true, false); Assert.AreEqual("(False, True, False)", a.ToString()); } finally { Thread.CurrentThread.CurrentCulture = originalCulture; } }