Struct AabbF
Represents an axis-aligned floating-point rectangle.
public readonly record struct AabbF : IEquatable<AabbF>
- Implements
- Inherited Members
Constructors
AabbF(float, float, float, float)
Represents an axis-aligned floating-point rectangle.
public AabbF(float X, float Y, float Width, float Height)
Parameters
Properties
Bottom
Gets the maximum Y coordinate.
public float Bottom { get; }
Property Value
Height
public float Height { get; init; }
Property Value
Left
Gets the minimum X coordinate.
public float Left { get; }
Property Value
Right
Gets the maximum X coordinate.
public float Right { get; }
Property Value
Top
Gets the minimum Y coordinate.
public float Top { get; }
Property Value
Width
public float Width { get; init; }
Property Value
X
public float X { get; init; }
Property Value
Y
public float Y { get; init; }
Property Value
Methods
Intersects(AabbF)
Returns whether this rectangle intersects another rectangle.
public bool Intersects(AabbF other)
Parameters
otherAabbFThe rectangle to test.
Returns
Translate(Float2)
Returns a copy translated by the supplied offset.
public AabbF Translate(Float2 offset)
Parameters
offsetFloat2The offset to apply.
Returns
- AabbF
The translated rectangle.