Clamp Array

Pure
ClampArray

Calculates start/end indices for processing a batch. Useful for spreading work across frames.

Type: Pure (no side effects)
Category: Fortuna|Array & Collection
Keywords: array & collection

Inputs

NameTypeDefaultDescription
TotalCountintTotalCount parameter
BatchSizeintBatchSize parameter
CurrentBatchintCurrentBatch parameter

Outputs

NameTypeDescription
StartIndexintStartIndex output
EndIndexintEndIndex output
bIsLastBatchboolbIsLastBatch output

Example Use Cases

Example 1

Process 1000 actors in batches of 50 per frame.

Example 2

Load resources in chunks to avoid hitches.