public static void ConsistentWithMatrixShiftTest() { TrafoTesting.GenericTest(rnd => { var shift = rnd.UniformV3d() * 10; var m = M34d.Translation(shift); var r = new Shift3d(shift); var p = rnd.UniformV3d() * rnd.UniformInt(1000); var res = m.TransformPos(p); var res2 = r.Transform(p); TrafoTesting.AreEqual(res, res2); }); }
public void Write(Shift3d t) { Write(t.V); }
public static void FromTrafo3d() => TrafoTesting.GenericConversionTest(TrafoTesting.GetRandomShift3, a => (Trafo3d)a, b => Shift3d.FromTrafo3d(b));