/// <summary>
 /// Updates the layout in the cache.
 /// </summary>
 public void UpdateCache(RectD layout)
 {
     if (layout.Equals(cachedLayout) && upVector.Equals(cachedOrientedRect.GetUp()))
     {
         return;
     }
     cachedLayout = layout;
     cachedOrientedRect.SetUpVector(upVector.X, upVector.Y);
     cachedOrientedRect.Width  = Width;
     cachedOrientedRect.Height = Height;
     cachedOrientedRect.SetCenter(cachedLayout.Center);
 }
Ejemplo n.º 2
0
 public void EqualsEpsilon()
 {
     Assert.IsTrue(RectD.Equals(rectD, new RectD(1.1, 1.9, 3.9, 5.1), 0.2));
     Assert.IsTrue(RectF.Equals(rectF, new RectF(1.1f, 1.9f, 3.9f, 5.1f), 0.2f));
 }