public void Ctor(int x, int y) { var point = new RoixIntPoint(x, y); point.X.Is(x); point.Y.Is(y); }
public void Deconstruct() { var point = new RoixIntPoint(1, 2); var(x, y) = point; x.Is(point.X); y.Is(point.Y); }
public void FromRoix() { double x = 1.1, y = 2.2; var rp1 = new RoixPoint(x, y); RoixIntPoint rip1 = rp1.ToRoixInt(); rip1.X.Is((int)Math.Round(rp1.X)); rip1.Y.Is((int)Math.Round(rp1.Y)); }
public void ToRoix() { int x = 1, y = 2; var rip1 = new RoixIntPoint(x, y); RoixPoint rp1 = (RoixPoint)rip1; rp1.X.Is(rip1.X); rp1.Y.Is(rip1.Y); }
public void Equal() { int x = 1, y = 2; var p1 = new RoixIntPoint(x, y); var p2 = new RoixIntPoint(x, y); p1.Equals(p2).IsTrue(); (p1 == p2).IsTrue(); (p1 != p2).IsFalse(); var obj2 = (object)p2; p1.Equals(obj2).IsTrue(); }
public void Ctor(int x, int y, int width, int height) { var point = new RoixIntPoint(x, y); var size = new RoixIntSize(width, height); var rect1 = new RoixIntRect(point, size); rect1.Location.X.Is(point.X); rect1.Location.Y.Is(point.Y); rect1.Size.Width.Is(size.Width); rect1.Size.Height.Is(size.Height); var rect2 = new RoixIntRect(new RoixIntPoint(x, y), new RoixIntSize(width, height)); rect2.Location.X.Is(point.X); rect2.Location.Y.Is(point.Y); rect2.Size.Width.Is(size.Width); rect2.Size.Height.Is(size.Height); }