Struct MinMaxRect
Class containing an axis aligned (two-dimensional) rectangle specified by its minimum (lower-left) and maximum (upper-right) points in 2d space.
Inherited Members
Namespace: Fusee.Math.Core
Assembly: Fusee.Math.Core.dll
Syntax
public struct MinMaxRect
Fields
Max
Returns the maximum (upper-right corner) as a float2 vector.
Declaration
public float2 Max
Field Value
Type | Description |
---|---|
float2 |
Min
Returns the minimum (lower-left corner) as a float2 vector.
Declaration
public float2 Min
Field Value
Type | Description |
---|---|
float2 |
Properties
Center
Calculates the center of this rectangle.
Declaration
public readonly float2 Center { get; }
Property Value
Type | Description |
---|---|
float2 | The rectangle's center. |
Size
Calculates the size of this rectangle.
Declaration
public readonly float2 Size { get; }
Property Value
Type | Description |
---|---|
float2 | The rectangle's size. |
Methods
FromCenterSize(float2, float2)
Creates a new MinMaxRect from the specified center and size.
Declaration
public static MinMaxRect FromCenterSize(float2 center, float2 size)
Parameters
Type | Name | Description |
---|---|---|
float2 | center | The center of rect to be returned. |
float2 | size | The size of the rect to be returned. |
Returns
Type | Description |
---|---|
MinMaxRect | A new MinMaxRect located at the specified center with the given size. |
ToString()
Returns a System.String that represents the current MinMaxRect.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string. |
Overrides
ToString(IFormatProvider)
Returns a System.String that represents the current MinMaxRect.
Declaration
public string ToString(IFormatProvider provider)
Parameters
Type | Name | Description |
---|---|---|
System.IFormatProvider | provider | Provides information about a specific culture. |
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |