Skip to content

Rectangle.FromCenter Method

Definition

Namespace: Brine2D.Core

Overloads
FromCenter\(Vector2, float, float\) Creates a rectangle centered at the specified position.
FromCenter\(Vector2, Vector2\) Creates a rectangle centered at the specified position.

Rectangle.FromCenter\(Vector2, float, float\) Method

Creates a rectangle centered at the specified position.

C#
public static Brine2D.Core.Rectangle FromCenter(System.Numerics.Vector2 center, float width, float height);

Parameters

center System.Numerics.Vector2

width System.Single

height System.Single

Returns

Rectangle

Rectangle.FromCenter\(Vector2, Vector2\) Method

Creates a rectangle centered at the specified position.

C#
public static Brine2D.Core.Rectangle FromCenter(System.Numerics.Vector2 center, System.Numerics.Vector2 size);

Parameters

center System.Numerics.Vector2

size System.Numerics.Vector2

Returns

Rectangle