/// <summary> /// Gets a value indicating whether the rectangle contains the specified point. /// </summary> /// <param name="point">The point to evaluate.</param> /// <returns><see langword="true"/> if the rectangle contains the specified point; otherwise, <see langword="false"/>.</returns> public Boolean Contains(Point2F point) { return (point.X >= this.x && point.X < this.x + this.width && point.Y >= this.y && point.Y < this.y + this.height); }
/// <summary> /// Initializes a new instance of the <see cref="RectangleF"/> class. /// </summary> /// <param name="position">The rectangle's position.</param> /// <param name="size">The rectangle's size.</param> public RectangleF(Point2F position, Size2F size) : this(position.X, position.Y, size.Width, size.Height) { }
/// <summary> /// Gets a value indicating whether the rectangle contains the specified point. /// </summary> /// <param name="point">The point to evaluate.</param> /// <param name="result">A value indicating whether the rectangle contains the specified point.</param> public void Contains(ref Point2F point, out Boolean result) { result = point.X >= this.x && point.X < this.x + this.width && point.Y >= this.y && point.Y < this.y + this.height; }
public CircleF(Point2F position, Single radius) : this(position.X, position.Y, radius) { }