Esempio n. 1
0
		public void Centroid()
		{
			A = new Triangle(0.0, 0.2, 0.4);
			Assert.AreEqual(0.2, Math.Round(A.centroid(), 5), "Invalid symmetric centroid");
			A = new Triangle(0, 2, 4);
			Assert.AreEqual(2, Math.Round(A.centroid(), 5), "Invalid symmetric centroid with integer params");
			A = new Triangle(0, 2, 7);
			Assert.AreEqual(3, Math.Round(A.centroid(), 5), "Invalid asymmetric centroid");
		}