예제 #1
0
 /// <summary>Initializes a new vector from the provided components</summary>
 /// <param name="x">Absolute and relative X coordinate of the vector</param>
 /// <param name="y">Absolute and relative Y coordinate of the vector</param>
 public UniVector(UniScalar x, UniScalar y)
 {
     this.X = x;
     this.Y = y;
 }
예제 #2
0
 /// <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)
 {
     this.Location = new UniVector(x, y);
     this.Size     = new UniVector(width, height);
 }
예제 #3
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(UniScalar other)
 {
     // For a struct, 'other' cannot be null
     return((this.Fraction == other.Fraction) && (this.Offset == other.Offset) && (this.ParentOffset == other.ParentOffset));
 }