Example #1
0
 /// <summary>
 /// Checks, if specified <see cref="MyPoint"/> is inside <see cref="MyRectangleF"/>.
 /// </summary>
 /// <param name="point">Coordinate <see cref="MyPoint"/>.</param>
 /// <returns><c>true</c> if <see cref="MyPoint"/> is inside <see cref="MyRectangleF"/>, otherwise <c>false</c>.</returns>
 public bool Contains(MyPoint point)
 {
     return(Contains(point.X, point.Y));
 }
Example #2
0
 /// <summary>
 /// Gets random <see cref="MyPoint"/>.
 /// </summary>
 /// <param name="random">Current <see cref="System.Random"/>.</param>
 /// <param name="min">Minimum.</param>
 /// <param name="max">Maximum.</param>
 /// <returns>Random <see cref="MyPoint"/>.</returns>
 public static MyPoint NextPoint(this Random random, MyPoint min, MyPoint max)
 {
     return(new MyPoint(random.Next(min.X, max.X), random.Next(min.Y, max.Y)));
 }
Example #3
0
 /// <summary>Changes the position of the rectangle.</summary>
 /// <param name="amount">The values to adjust the position of the rectangle by.</param>
 public void Offset(MyPoint amount)
 {
     Offset(amount.X, amount.Y);
 }