Example #1
0
 /// <summary>
 /// Determines whether the specified <see cref="SharpDX.Viewport"/> is equal to this instance.
 /// </summary>
 /// <param name="other">The <see cref="SharpDX.Viewport"/> to compare with this instance.</param>
 /// <returns>
 /// <c>true</c> if the specified <see cref="SharpDX.Viewport"/> is equal to this instance; otherwise, <c>false</c>.
 /// </returns>
 public bool Equals(Viewport other)
 {
     return(X == other.X && Y == other.Y && Width == other.Width && Height == other.Height && MathUtil.WithinEpsilon(MinDepth, other.MinDepth) && MathUtil.WithinEpsilon(MaxDepth, other.MaxDepth));
 }
Example #2
0
 /// <summary>
 /// Determines whether the specified <see cref="SharpDX.ViewportF"/> is equal to this instance.
 /// </summary>
 /// <param name="other">The <see cref="SharpDX.ViewportF"/> to compare with this instance.</param>
 /// <returns>
 /// <c>true</c> if the specified <see cref="SharpDX.ViewportF"/> is equal to this instance; otherwise, <c>false</c>.
 /// </returns>
 public bool Equals(ViewportF other)
 {
     return(MathUtil.WithinEpsilon(X, other.X) && MathUtil.WithinEpsilon(Y, other.Y) && MathUtil.WithinEpsilon(Width, other.Width) && MathUtil.WithinEpsilon(Height, other.Height) && MathUtil.WithinEpsilon(MinDepth, other.MinDepth) &&
            MathUtil.WithinEpsilon(MaxDepth, other.MaxDepth));
 }