# Cycle
Grammar — Cycle var from inMin through inMax
Flags —Operator
|Action
Increments an integer variable by 1, but keeps it within a given range. If this increment causes the variable to exceed the Max value, the variable is reset to the Min value.
# Arguments
anyvariable
— Valueint
— Minint
— Max
Returns — void
if (#PARAM(var) >= #PARAM(inMax)) {
#PARAM(var) = #PARAM(inMin);
}
else {
#PARAM(var) = #PARAM(var) + 1;
}
# Related
Category: Math / Arithmetic
- Absolute Value (Integer) —
int
— AbsI - Absolute Value (Real) —
fixed
— AbsF - Arithmetic (Integer)
- Bitwise Arithmetic (Integer)
- Arithmetic (Real)
- Arithmetic Multiple (Integer)
- Bitwise Arithmetic Multiple (Integer)
- Arithmetic Multiple (Real)
- Ceiling (Integer) —
int
— CeilingI - Ceiling (Real) —
fixed
— Ceiling - Clamp (Integer) —
int
— libNtve_gf_ArithmeticIntClamp - Clamp (Real) —
fixed
— libNtve_gf_ArithmeticRealClamp - Cycle
- Floor (Integer) —
int
— FloorI - Floor (Real) —
fixed
— Floor - Log2 (Integer) —
int
— Log2I - Log2 (Real) —
fixed
— Log2 - Log (Real) —
fixed
— libNtve_gf_Log - Modulo (Integer) —
int
— ModI - Modulo (Real) —
fixed
— ModF - Power (Integer) —
int
— PowI - Power (Real) —
fixed
— Pow - Round (Integer) —
int
— RoundI - Round (Real) —
fixed
— Round - Pow2 (Integer) —
int
— Pow2I - Pow2 (Real) —
fixed
— Pow2 - Square Root (Integer) —
int
— SquareRootI - Square Root (Real) —
fixed
— SquareRoot - Trunc (Integer) —
int
— TruncI - Trunc (Real) —
fixed
— Trunc
# Examples
— None found —