ProtoFlux:Rect To Min Max: Difference between revisions

From Resonite Wiki
Added a suggestion note.
Added "in contrast" sentance.
 
Line 13: Line 13:
|}}
|}}


The '''Rect To Min Max''' node takes in a [[Type:Rect|rect]] [[Value Type|value]] and returns 2 specific [[Type:float2|float2]] values, showing the minimum size of the rect, usually just at the <code>X</code> and <code>Y</code> position, and also returning the max size of this rect, which is usually <code>X</code> + <code>Width</code> and <code>Y</code> + <code>Height</code>.
The '''Rect To Min Max''' node takes in a [[Type:Rect|rect]] [[Value Type|value]] and returns 2 specific [[Type:float2|float2]] values, showing the minimum size of the rect, usually just at the <code>X</code> and <code>Y</code> position, and also returning the max size of this rect, which is usually <code>X</code> + <code>Width</code> and <code>Y</code> + <code>Height</code>. In contrast to the [[ProtoFlux:Rect To Position Size|Rect To Position Size]] node where it takes the literal position and size to get a rect's bounding data.


{{Note|If you need to make a rect from a min and max size, use the [[ProtoFlux:Rect From Min Max|Rect From Min Max]] node instead.
{{Note|If you need to make a rect from a min and max size, use the [[ProtoFlux:Rect From Min Max|Rect From Min Max]] node instead.

Latest revision as of 10:20, 30 June 2024

Rect To Min Max
Rect
Min
Max
Rects

The Rect To Min Max node takes in a rect value and returns 2 specific float2 values, showing the minimum size of the rect, usually just at the X and Y position, and also returning the max size of this rect, which is usually X + Width and Y + Height. In contrast to the Rect To Position Size node where it takes the literal position and size to get a rect's bounding data.

If you need to make a rect from a min and max size, use the Rect From Min Max node instead.

If you need to split a rect into specific and separated outputs, use the Rect To XYWH node instead.

Inputs

Rect (Rect)

The rect value.

Outputs

Min (float2)

Returns the minimum size of this rect (usually returning the X and Y position of this rect).

Max (float2)

Returns the maximum size of this rect (usually returning the X + Width and Y + Height of this rect).