/// <summary>Initializes a new rectangle from the provided individual coordinates</summary>
 /// <param name="x">X coordinate of the rectangle's left border</param>
 /// <param name="y">Y coordinate of the rectangle's upper border</param>
 /// <param name="width">Width of the area covered by the rectangle</param>
 /// <param name="height">Height of the area covered by the rectangle</param>
 public UniRectangle(UniScalar x, UniScalar y, UniScalar width, UniScalar height)
 {
     Location = new UniVector(x, y);
     Size     = new UniVector(width, height);
 }
Exemple #2
0
 /// <summary>Checks whether another instance is equal to this instance</summary>
 /// <param name="other">Other instance to compare to this instance</param>
 /// <returns>True if the other instance is equal to this instance</returns>
 public bool Equals(UniVector other)
 {
     // For a struct, 'other' cannot be null
     return((X == other.X) && (Y == other.Y));
 }
 /// <summary>Initializes a new rectangle from a location and a size</summary>
 /// <param name="location">Location of the rectangle's upper left corner</param>
 /// <param name="size">Size of the area covered by the rectangle</param>
 public UniRectangle(UniVector location, UniVector size)
 {
     Location = location;
     Size     = size;
 }