Struct FRect
Rectangle with float data
Implements
Constructors
FRect(FRect)
Declaration
public FRect(FRect source)
FRect(Float2, Float2)
Declaration
public FRect(Float2 position, Float2 size)
FRect(float, float, float, float)
Declaration
public FRect(float x, float y, float width, float height)
Fields
height
Vertical size
Declaration
public float height
width
Horizontal size
Declaration
public float width
x
Left position
Declaration
public float x
y
Bottom position
Declaration
public float y
Properties
center
Declaration
public Float2 center { readonly get; set; }
max
Declaration
public Float2 max { readonly get; set; }
min
Declaration
public Float2 min { readonly get; set; }
position
Declaration
public Float2 position { readonly get; set; }
size
Declaration
public Float2 size { readonly get; set; }
xMax
Declaration
public float xMax { readonly get; set; }
xMin
Declaration
public float xMin { readonly get; set; }
yMax
Declaration
public float yMax { readonly get; set; }
yMin
Declaration
public float yMin { readonly get; set; }
Methods
Contains(Float2)
True if the given point inside this rectangle
Declaration
public readonly bool Contains(Float2 point)
Equals(FRect)
Indicates whether the current object is equal to another object of the same type.
Declaration
public readonly bool Equals(FRect other)
Parameters
Type | Name | Description |
---|---|---|
FRect | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object)
Indicates whether this instance and a specified object are equal.
Declaration
public override readonly bool Equals(object other)
Returns
Type | Description |
---|---|
bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override readonly int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
MinMaxRect(float, float, float, float)
Create a rectangle from min and max positions
Declaration
public static FRect MinMaxRect(float xmin, float ymin, float xmax, float ymax)
Overlaps(FRect)
True if the given rectangle overlaps the current one
Declaration
public readonly bool Overlaps(FRect other)
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override readonly string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
operator ==(FRect, FRect)
Declaration
public static bool operator ==(FRect lhs, FRect rhs)
operator !=(FRect, FRect)
Declaration
public static bool operator !=(FRect lhs, FRect rhs)