//---------------------functions -----------------------// public static vector reflect(vector R, vector normal) { //R = R * new Fixed(-1m); Debug.Log("a = " + R.ToString()); Debug.Log("b = " + normal.ToString()); vector c = R - (dot(R, normal) * new Fixed(2m) * normal); Debug.Log("c = " + c.ToString()); return(c); }
public void TestToString() { //vector.ToString TEST double[] TV = { 2.0, 3.0, 4.0 }; //TesVar (for actual vec) vector vec = new vector(TV); string actual = vec.ToString(); string expected = "( 2,00; 3,00; 4,00 )"; Assert.AreEqual(expected, actual); }